FNS4LRFQNFM4BCB23CYHOWA2N4MG2DEUMNK6D55BQ26TX6OJLIBQC
GBGS6RTZTCKRMLLDVCBGMRTJNNOSAUTXN5D2EMEQMQAREORE54PAC
XF52N4U7HWXOF4PDSCR7LCUENLTSXLWEZGS2IJ6562KYI567Z2GAC
DGUHVA7XX4HWCIXCARJCI7T6VTXEJUOPUYZOLDOOOWIZYFEJQYFQC
62YQ7EMUYX7GS3AB6FAJDKNX53LVG6T2EH6NMVS6JV36J5VCOKIAC
S5OSCH7CRN2YEKVTCTJXNLYR2B3PEGCCBUGTN2M6QOCKBNJR62NAC
R5JJA7VQ5HCQ6TZEFMORFMPYBXTMIOBAH6YMDCG4QZKBJZCQLR4AC
VPXUP5WZTVC3OVD73TNKPK43IAGFXGUGCEJT56JM4IT4APYQXUHAC
HUULCHM5GFGZ7GKLCULFHC333LQ3LBI62VKII3YL5O4C5CDGCT4AC
2RUZ7TTRT7SMZT2V7YWUCCTJJXNRT2LNJ2QBBVN4RMREMOGMGMHQC
VZRSH4U473FCZOP5EXURPXXN5J6F3ZLT435YY7A2JHLG2ZZB5KLQC
I33Z5QD6JHPO7W7G3EHGBIXQABW6ZOC2W4NJP6L5ENDPFRORUFNAC
P5O6MKCMZL3DK7ZO5SBWTCHOQB6O2MZA5VPSCQX6X4LJQVOWYV7AC
YI7M5RWLKUG256YXK6CGZKUPDCNHREU2PGV344L2IV24FF5PHG3AC
426KOWJWOX7ZE24UIJCIHRI5KUZYO6NIGK7KC2HOONFDX242UYIQC
FQZF2IY4T2F7KEVSHMFID35WNAU55CRRDF6XEXZB7PYZH26UGYPQC
CXWTEVMUJI7NXVWZKXTQOOIVCMPCXUEB3Q3SGIYYHDVRA3JHNBBAC
VUAVVMQEUYSXHBIUJHGRX237EZFT5MCB73ZKVWMGJDRHYZH4XZKAC
HMDPEJRZK3PO6M5Z655Y4HWCUKC5I35GRMVVQOZYXWWCIH5ZWNPQC
4JF64OZ2FPMTXL5XV3Z6HCEKKGCLXPLMNV3YCNX35RL5CXL42VNQC
DTKCWM4J7PFNWAAES3RZHQGDA6PTDNX4TZVOXAKF5V7LCZBI3XUAC
R475KN7MR3OG7EBLVNOO7QRIKXDGY2PIDXXV3HW4KBD5QM7B5OJQC
RJXFDWT7OWTX3DQ7SBJFK6M66AQ2LGGIO32QD6G7VTJJS7U2R7XQC
TKLR43RQKXB47J2YVVSJ7CAZAJZYOKXSDUXAUOVQMFUN73KZVUVQC
MQD6ISMHW27RCHAGJUINEULYXSY3JQ3UKVQPEM5PYDMM32TUYAYQC
62S5AKAC5VGAT4KZYRO4R6XIHO4CCD3RAUHQSW47VEGVEBNZGTGAC
HDXZWK64UDKEV5JBETQK6KMT5RXW5XPDU3YY4HLBCGP5XA6727BQC
FH3NHDU7BEUXKJLPIB2SZWCTI37CEQF6OMTKGP2T7WYE6V73NKVQC
JC4YSSPLLFZVYO7TPBHS6RGGEYAW3I3LF36QK7A3WDDDTM6P3LJAC
JLT7KOJ5QGXMRLXQXOHDTF62W3EGPX7XTHNEYAKGMJKK3V4QUPGQC
E6EFTMXHFWSSFW2JIKT2FM62L2GDNKLZ5B5ZVI4QGIZCZFFAMWWQC
ROTMK5LNNK7T5YXVOMUODVMCQWIHPZYOME4WDIAMZJ4VXD7SOEBAC
L4TF5YRRHYUPEAF72DU2GO3PBK5CXXHPYZB5SX3NRCUN6AQELH2QC
CD5FF75KTOBTMVMTMCKMR6F5DFKOF26I5K43ITNHGBI3ZAZHA4RAC
HXTSBPAP75A7EC4RKWYQMVPPHPNZFPHUORBZWDHGEB6MPAGI7G7AC
S256EPZUSOF4TV2KGOFZDJXUFDD57GZFYTCARFJ3SD24RPC56PHAC
case 0:
affected.GetComponent<BlueTag>().Current++;
break;
case 1:
affected.GetComponent<RedTag>().Current += (Unit<RedTagUnit>)1;
break;
case 2:
affected.GetComponent<GreenTag>().Current += (Unit<GreenTagUnit>)1;
break;
case 0: {
var modifier = new PermanentStatModifier<BlueTagUnit> {
Amount = (Unit<BlueTagUnit>)1
};
affected.GetComponent<BlueTag>().AddPermanentCurrentModifier(modifier);
break;
}
case 1: {
var modifier = new PermanentStatModifier<RedTagUnit> {
Amount = (Unit<RedTagUnit>)1
};
affected.GetComponent<RedTag>().AddPermanentCurrentModifier(modifier);
break;
}
case 2: {
var modifier = new PermanentStatModifier<GreenTagUnit> {
Amount = (Unit<GreenTagUnit>)1
};
affected.GetComponent<GreenTag>().AddPermanentCurrentModifier(modifier);
break;
}
fileFormatVersion: 2
guid: e0a4f0399c709264ab782b12ea6e16de
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
namespace TagFighter.Resources
{
public interface IStatAccessor
{
public void AddCurrentModifier<TResource, TUnitType>(TResource resource, Unit<TUnitType> value) where TResource : Resource<TUnitType> where TUnitType : IUnitType;
public void AddCapacityModifier<TResource, TUnitType>(TResource resource, Unit<TUnitType> value) where TResource : Resource<TUnitType> where TUnitType : IUnitType;
}
public class PermanentStatModifierAccessor : IStatAccessor
{
public void AddCurrentModifier<TResource, TUnitType>(TResource resource, Unit<TUnitType> value) where TResource : Resource<TUnitType> where TUnitType : IUnitType {
var modifier = new PermanentStatModifier<TUnitType> {
Amount = value
};
resource.AddPermanentCurrentModifier(modifier);
}
public void AddCapacityModifier<TResource, TUnitType>(TResource resource, Unit<TUnitType> value) where TResource : Resource<TUnitType> where TUnitType : IUnitType {
var modifier = new PermanentStatModifier<TUnitType> {
Amount = value
};
resource.AddPermanentCapacityModifier(modifier);
}
}
public class TransientStatModifierAccessor : IStatAccessor
{
double _duration;
public TransientStatModifierAccessor(double duration) {
_duration = duration;
}
public void AddCurrentModifier<TResource, TUnitType>(TResource resource, Unit<TUnitType> value) where TResource : Resource<TUnitType> where TUnitType : IUnitType {
var modifier = new TransientStatModifier<TUnitType>(Time.timeAsDouble + _duration) {
Amount = value
};
resource.AddTransientCurrentModifier(modifier);
}
public void AddCapacityModifier<TResource, TUnitType>(TResource resource, Unit<TUnitType> value) where TResource : Resource<TUnitType> where TUnitType : IUnitType {
var modifier = new TransientStatModifier<TUnitType>(Time.timeAsDouble + _duration) {
Amount = value
};
resource.AddTransientCapacityModifier(modifier);
}
}
}
fileFormatVersion: 2
guid: 7bb214e6518a2aa4cae0c5a2d997643e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace TagFighter.Resources
{
public interface IStatModifier<TUnitType> where TUnitType : IUnitType
{
public Unit<TUnitType> Amount { get; set; }
}
public class PermanentStatModifier<TUnitType> : IStatModifier<TUnitType> where TUnitType : IUnitType
{
public Unit<TUnitType> Amount { get; set; }
}
public class TransientStatModifier<TUnitType> : IStatModifier<TUnitType> where TUnitType : IUnitType
{
public double ExpiryTime;
public TransientStatModifier(double expiryTime) {
ExpiryTime = expiryTime;
}
public Unit<TUnitType> Amount { get; set; }
}
public interface IStat { }
[Serializable]
public class Stat<TUnitType> : IStat where TUnitType : IUnitType
{
[SerializeField] Unit<TUnitType> _base;
List<TransientStatModifier<TUnitType>> _modifiers = new();
HashSet<double> Expiry = new();
public Unit<TUnitType> Base {
get {
return _base;
}
private set {
_base = value;
}
}
public Unit<TUnitType> Modified => _modifiers.Aggregate((Unit<TUnitType>)0, (acc, modifier) => acc + modifier.Amount);
public Unit<TUnitType> Value => Base + Modified;
/// <Summary>
/// Adds a new permanent modifier to the stat. Taken into account in <paramref name="Base"/> property.
/// </Summary>
public void AddPermanentModifier(PermanentStatModifier<TUnitType> modifier) {
Base += modifier.Amount;
}
/// <Summary>
/// Adds a new transient modifier to the stat. Taken into account in <paramref name="Modified"/> and <paramref name="Value"/> properties.
/// </Summary>
/// <returns>
/// True when a transient modifier with a new expiry time is inserted.
/// False when a transient modifier with the same expiry time is already present.
/// </returns>
public bool AddTransientModifier(TransientStatModifier<TUnitType> modifier) {
_modifiers.Add(modifier);
return Expiry.Add(modifier.ExpiryTime);
}
public void Retire(double expiryTime) {
_modifiers = _modifiers.Where(modifier => modifier.ExpiryTime > expiryTime).ToList();
Expiry.Remove(expiryTime);
}
}
}
public Unit<TUnit> Capacity {
get => _capacity;
set {
if (Capacity == value) {
return;
}
_capacity = value;
OnCapacityChanged?.Invoke(this, (OnChangeArgs)this);
if (Current < Capacity) {
Current = Capacity;
}
public Unit<TUnitType> GetCapacity() {
var value = _capacity.Value;
if (value < _minimumCapacity) {
value = _minimumCapacity;
}
return value;
}
public void AddPermanentCapacityModifier(PermanentStatModifier<TUnitType> modifier) {
_capacity.AddPermanentModifier(modifier);
OnCapacityChanged?.Invoke(this, (OnChangeArgs)this);
}
public void AddTransientCapacityModifier(TransientStatModifier<TUnitType> modifier) {
var stat = _capacity;
if (stat.AddTransientModifier(modifier)) {
StartCoroutine(ExpireModifiers(modifier.ExpiryTime, stat, OnCapacityChanged));
public Unit<TUnit> Current {
get => _current;
set {
var valueToSet = Unit<TUnit>.Clamp(value, _minimumCapacity, Capacity);
if (_current != valueToSet) {
_current = valueToSet;
OnCurrentChanged?.Invoke(this, (OnChangeArgs)this);
}
public Unit<TUnitType> GetCurrent() {
var value = _current.Value;
value = Unit<TUnitType>.Clamp(value, _minimumCapacity, GetCapacity());
return value;
}
public void AddPermanentCurrentModifier(PermanentStatModifier<TUnitType> modifier) {
_current.AddPermanentModifier(modifier);
OnCurrentChanged?.Invoke(this, (OnChangeArgs)this);
}
public void AddTransientCurrentModifier(TransientStatModifier<TUnitType> modifier) {
var stat = _current;
if (stat.AddTransientModifier(modifier)) {
StartCoroutine(ExpireModifiers(modifier.ExpiryTime, stat, OnCurrentChanged));
public Unit<TUnit> RegenerationAmount {
get => regenerationAmount;
set {
regenerationAmount = value;
OnRegenerationAmountChanged?.Invoke(this, (OnChangeArgs)this);
}
protected IEnumerator ExpireModifiers(double expiryTime, Stat<TUnitType> stat, EventHandler<OnChangeArgs> OnStatChanged) {
float timeToWait = (float)(expiryTime - Time.timeAsDouble);
yield return new WaitForSeconds(timeToWait);
Debug.Log($"Retiring modifiers with expiry < {expiryTime}");
stat.Retire(expiryTime);
OnStatChanged?.Invoke(this, (OnChangeArgs)this);
private IEnumerator Regenerate() {
while (true) {
yield return new WaitForSeconds(RegenerationRate);
Current += RegenerationAmount;
// print($"Regenerated {typeof(T).Name}, value = {Current}");
}
}
protected void Start() {
StartCoroutine(Regenerate());
}
fileFormatVersion: 2
guid: e3729d42b0ca61b4581f81220d160ffe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using TagFighter.Resources;
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer(typeof(Stat<>))]
public class StatPropertyDrawer : PropertyDrawer
{
// Draw the property inside the given rect
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) {
// Using BeginProperty / EndProperty on the parent property means that
// prefab override logic works on the entire property.
EditorGUI.BeginProperty(position, label, property);
// Draw label
position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label);
// Don't make child fields be indented
var indent = EditorGUI.indentLevel;
EditorGUI.indentLevel = 0;
// Calculate rects
var valueRect = new Rect(position.x, position.y, Screen.width, position.height);
// Draw fields - pass GUIContent.none to each so they are drawn without labels
EditorGUI.PropertyField(valueRect, property.FindPropertyRelative("_base"), GUIContent.none);
// Set indent back to what it was
EditorGUI.indentLevel = indent;
EditorGUI.EndProperty();
}
}
public IEnumerable<double> Get(EffectContext context, IEnumerable<Transform> affected, IResourceLocationGet accessor);
public void Set(EffectContext context, IEnumerable<Transform> affected, IResourceLocationSet accessor, IEnumerable<int> value);
public IEnumerable<double> Get(EffectInput data, IResourceLocationGet accessor);
public void Set(EffectInput data, IResourceLocationSet accessor, IEnumerable<int> value);
public IEnumerable<double> Get(EffectContext context, IEnumerable<Transform> affected, IResourceLocationGet accessor) {
return accessor.Get<TResource, TUnit>(context, affected).Select(resource => (double)resource);
public IEnumerable<double> Get(EffectInput data, IResourceLocationGet accessor) {
return accessor.Get<TResource, TUnit>(data).Select(resource => (double)resource);
public void Set(EffectContext context, IEnumerable<Transform> affected, IResourceLocationSet accessor, IEnumerable<int> values) {
accessor.Set<TResource, TUnit>(context, affected, values.Select(value => (Unit<TUnit>)value));
public void Set(EffectInput data, IResourceLocationSet accessor, IEnumerable<int> values) {
accessor.Set<TResource, TUnit>(data, values.Select(value => (Unit<TUnit>)value));
public IEnumerable<double> Get(EffectContext context, IEnumerable<Transform> affected) {
return IsInit ? Resource.Get(context, affected, Location).Select(resource => (Multiplier * resource) + Addend) :
public IEnumerable<double> Get(EffectInput data) {
return IsInit ? Resource.Get(data, Location).Select(resource => (Multiplier * resource) + Addend) :
where TResource : Resource<TUnit> where TUnit : IUnitType => resource.Current;
public void Set<TResource, TUnit>(TResource resource, Unit<TUnit> value)
where TResource : Resource<TUnit> where TUnit : IUnitType => resource.Current = value;
where TResource : Resource<TUnit> where TUnit : IUnitType => resource.GetCurrent();
public void Set<TResource, TUnit>(EffectInput data, TResource resource, Unit<TUnit> value)
where TResource : Resource<TUnit> where TUnit : IUnitType => data.StatAccessor.AddCurrentModifier(resource, value);
where TResource : Resource<TUnit> where TUnit : IUnitType => resource.Capacity;
public void Set<TResource, TUnit>(TResource resource, Unit<TUnit> value)
where TResource : Resource<TUnit> where TUnit : IUnitType => resource.Capacity = value;
where TResource : Resource<TUnit> where TUnit : IUnitType => resource.GetCapacity();
public void Set<TResource, TUnit>(EffectInput data, TResource resource, Unit<TUnit> value)
where TResource : Resource<TUnit> where TUnit : IUnitType => data.StatAccessor.AddCapacityModifier(resource, value);
[Serializable]
public class RegenerationAmount : IPawnResourceProperty
{
public Unit<TUnit> Get<TResource, TUnit>(TResource resource)
where TResource : Resource<TUnit> where TUnit : IUnitType => resource.RegenerationAmount;
public void Set<TResource, TUnit>(TResource resource, Unit<TUnit> value)
where TResource : Resource<TUnit> where TUnit : IUnitType => resource.RegenerationAmount = value;
public override string ToString() => nameof(RegenerationAmount);
}
return affected.Select(transform => transform.GetComponent<TResource>())
.Select(resource => resource ? Property.Get<TResource, TUnit>(resource) : (Unit<TUnit>)0);
return data.Affected.Select(transform => transform.GetComponent<TResource>())
.Select(resource => resource ? Property.Get<TResource, TUnit>(resource) : (Unit<TUnit>)0);
foreach (var tuple in affected.Zip(repeatedValues, (transform, value) => (resource: transform.GetComponent<TResource>(), value))
.Where(tuple => tuple.resource)) {
Property.Set(tuple.resource, tuple.value);
foreach (var tuple in data.Affected.Zip(repeatedValues, (transform, value) => (resource: transform.GetComponent<TResource>(), value))
.Where(tuple => tuple.resource)) {
Property.Set(data, tuple.resource, tuple.value);
fileFormatVersion: 2
guid: 75d3569cf2cac3942ace199d3f57185a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using TagFighter.Resources;
using UnityEngine;
namespace TagFighter.Effects
{
public class PawnCondition : MonoBehaviour
{
public double Duration;
public float Frequency;
public Transform Origin;
public EffectContext Context;
public void Apply() {
Debug.Log("Started a new condition");
Debug.Log($"Origin: {Origin} Caster: {Context.Caster} Target: {Context.EffectLocation}");
StartCoroutine(Tick());
}
private IEnumerator Tick() {
double _remainingDuration = Duration;
EffectInput data = new(Context, Context.GetAffectedUnits(), new PermanentStatModifierAccessor());
while (_remainingDuration > 0) {
yield return new WaitForSeconds(Frequency);
Debug.Log("Tick");
foreach (var effect in Context.EffectsToTrigger) {
effect.DelayedAction(data);
}
_remainingDuration -= Frequency;
// print($"Regenerated {typeof(T).Name}, value = {Current}");
}
Destroy(this);
}
}
}
void Apply(EffectContext context, IEnumerable<Transform> affected);
void Apply(EffectInput data);
}
public class EffectInput {
public EffectContext Context;
public IEnumerable<Transform> Affected;
public IStatAccessor StatAccessor;
public EffectInput(EffectContext context, IEnumerable<Transform> affected, IStatAccessor statAccessor) {
Context = context;
Affected = affected;
StatAccessor = statAccessor;
}
public void DelayedAction(EffectContext context) {
_effect.Apply(context, context.GetAffectedUnits());
context.EffectSystem.ApplyTagsEffect(null, context.EffectLocation, context.AreaOfEffect);
public void DelayedAction(EffectInput data) {
_effect.Apply(data);
data.Context.EffectSystem.ApplyTagsEffect(null, data.Context.EffectLocation, data.Context.AreaOfEffect);
effect.Apply(context, areaOfEffect.GetAffectedUnits(context.EffectLocation));
EffectInput data = new(context, Enumerable.Empty<Transform>(), new PermanentStatModifierAccessor());
var areaOfEffect = _areaOfEffect.AreaOfEffect(data);
data.Affected = areaOfEffect.GetAffectedUnits(context.EffectLocation);
effect.Apply(data);
public class ReleaseEffect : IImmediateEffect
public class ImmediateWeave : IImmediateEffect
{
public void ImmediateAction(EffectContext context, IEffect effect) {
EffectInput data = new(context, context.GetAffectedUnits(), new PermanentStatModifierAccessor());
if (effect != null) {
effect.Apply(data);
data.Affected = context.GetAffectedUnits();
}
Materialize(data);
}
private void Materialize(EffectInput data) {
foreach (var effect in data.Context.EffectsToTrigger) {
effect.DelayedAction(data);
}
data.Context.EffectsToTrigger.Clear();
}
}
[Serializable]
public class TransientWeave : IImmediateEffect
context.TriggerEffect();
/// Currently Duration and Frequency are Context getters so there's only a single value in the iterator.
/// To support get from pawns, requires somekind of aggregation operator from <see cref="IResourceOperator"/>
/// to be included in this
var duration = Duration.Get(data).First();
data.StatAccessor = new TransientStatModifierAccessor(duration);
Materialize(data);
}
private void Materialize(EffectInput data) {
foreach (var effect in data.Context.EffectsToTrigger) {
effect.DelayedAction(data);
}
data.Context.EffectsToTrigger.Clear();
[Serializable]
public class PeriodicWeave : IImmediateEffect
{
[SerializeReference, ShowSerializeReference]
public AoeShapes.IAoeShape AreaOfEffect;
public ResourceInfoGet<IResourceTypeAccessor, ResourceLocationAccessors.Get.Context> Duration;
public ResourceInfoGet<IResourceTypeAccessor, ResourceLocationAccessors.Get.Context> Frequency;
const double MinFrequency = 0.1;
const double MaxDuration = 30;
public void ImmediateAction(EffectContext context, IEffect effect) {
EffectInput data = new(context, context.GetAffectedUnits(), null);
if (effect != null) {
effect.Apply(data);
data.Affected = context.GetAffectedUnits();
}
Materialize(data);
}
private void Materialize(EffectInput data) {
/// Currently Duration and Frequency are Context getters so there's only a single value in the iterator.
/// To support get from pawns, requires somekind of aggregation operator from <see cref="IResourceOperator"/>
/// to be included in this
var duration = Duration.Get(data).First();
duration = Math.Clamp(duration, MinFrequency, MaxDuration);
var frequency = Frequency.Get(data).First();
frequency = Math.Clamp(frequency, MinFrequency, duration);
var areaOfEffect = AreaOfEffect.AreaOfEffect(data);
/// Move all effects in context to condition context.
List<IDelayedEffect> effectsToTrigger = new(data.Context.EffectsToTrigger);
data.Context.EffectsToTrigger.Clear();
var origin = data.Context.Caster;
foreach (var affectedPawn in data.Affected) {
var condition = affectedPawn.gameObject.AddComponent<PawnCondition>();
condition.Duration = duration;
condition.Frequency = (float)frequency;
condition.Origin = origin;
condition.Context = new EffectContext(data.Context.EffectSystem) {
AreaOfEffect = areaOfEffect,
Caster = affectedPawn,
EffectLocation = affectedPawn,
EffectsToTrigger = effectsToTrigger
};
condition.Apply();
}
}
}
public void TriggerEffect() {
foreach (var effect in EffectsToTrigger) {
effect.DelayedAction(this);
}
ResetEffects();
}
public void Apply(EffectContext context, IEnumerable<Transform> affected) {
context.AreaOfEffect = Shape.AreaOfEffect(context, affected);
public void Apply(EffectInput data) {
data.Context.AreaOfEffect = Shape.AreaOfEffect(data);
public IAreaOfEffect AreaOfEffect(EffectContext context, IEnumerable<Transform> affected) {
// Currently only getting from context, so it's a size 1 enumarable
_areaOfEffect.Radius = (float)Radius.Get(context, affected).First();
public IAreaOfEffect AreaOfEffect(EffectInput data) {
/// Currently Radius is a Context getter so there's only a single value in the iterator.
/// To support get from pawns, requires somekind of aggregation operator from <see cref="IResourceOperator"/>
/// to be included in this
_areaOfEffect.Radius = (float)Radius.Get(data).First();
public IAreaOfEffect AreaOfEffect(EffectContext context, IEnumerable<Transform> affected) {
// Currently only getting from context, so it's a size 1 enumarable
_areaOfEffect.Radius = (float)Radius.Get(context, affected).First();
_areaOfEffect.Angle = (float)Angle.Get(context, affected).First();
public IAreaOfEffect AreaOfEffect(EffectInput data) {
/// Currently Radius and Angle are a Context getter so there's only a single value in the iterator.
/// To support get from pawns, requires somekind of aggregation operator from <see cref="IResourceOperator"/>
/// to be included in this
_areaOfEffect.Radius = (float)Radius.Get(data).First();
_areaOfEffect.Angle = (float)Angle.Get(data).First();
public IAreaOfEffect AreaOfEffect(EffectContext context, IEnumerable<Transform> affected) {
// Currently only getting from context, so it's a size 1 enumarable
_areaOfEffect.Radius = (float)Radius.Get(context, affected).First();
_areaOfEffect.Length = (float)Length.Get(context, affected).First();
public IAreaOfEffect AreaOfEffect(EffectInput data) {
/// Currently Radius and Length are a Context getter so there's only a single value in the iterator.
/// To support get from pawns, requires somekind of aggregation operator from <see cref="IResourceOperator"/>
/// to be included in this
_areaOfEffect.Radius = (float)Radius.Get(data).First();
_areaOfEffect.Length = (float)Length.Get(data).First();
rid: 7043444593006739592
Effect:
rid: 7043444546427682858
- Mode:
rid: 7043444504695668771
rid: 7043444593006739635
Addend: 0
To:
Resource:
rid: 7043444593006739533
Location:
rid: 7043444593006739534
Multiplier: 1
Addend: 0
- rid: 7043444546427682866
Addend: 1
- rid: 7043444593006739637
type: {class: Single, ns: TagFighter.Effects.AoeShapes, asm: Assembly-CSharp}
- rid: 7043444593006739638
type: {class: AoeEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
data:
Shape:
rid: 7043444593006739639
- rid: 7043444593006739639
type: {class: Single, ns: TagFighter.Effects.AoeShapes, asm: Assembly-CSharp}
- rid: 7043444593006739640
rid: 7043444593006739543
Multiplier: 2
Addend: 0
- rid: 7043444593006739501
type: {class: Max, ns: TagFighter.Effects.Operators, asm: Assembly-CSharp}
- rid: 7043444593006739527
type: {class: BlueTag, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739528
type: {class: Pawn, ns: TagFighter.Effects.ResourceLocationAccessors.Get, asm: Assembly-CSharp}
data:
Property:
rid: 7043444593006739529
- rid: 7043444593006739529
type: {class: Current, ns: TagFighter.Effects.ResourceLocationAccessors.PawnProperties,
asm: Assembly-CSharp}
- rid: 7043444593006739530
type: {class: GreenTag, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739531
rid: 7043444593006739645
Multiplier: 1
Addend: 10
- rid: 7043444593006739642
- rid: 7043444593006739534
type: {class: Context, ns: TagFighter.Effects.ResourceLocationAccessors.Set,
asm: Assembly-CSharp}
data:
Register:
rid: 7043444593006739535
SetAs:
rid: 7043444593006739536
- rid: 7043444593006739535
type: {class: Current, ns: TagFighter.Effects.ResourceLocationAccessors.ContextRegisters,
asm: Assembly-CSharp}
- rid: 7043444593006739536
type: {class: Sum, ns: TagFighter.Effects.Operators, asm: Assembly-CSharp}
- rid: 7043444593006739537
type: {class: Pain, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739540
type: {class: Context, ns: TagFighter.Effects.ResourceLocationAccessors.Get,
asm: Assembly-CSharp}
data:
Register:
rid: 7043444593006739541
- rid: 7043444593006739541
type: {class: Current, ns: TagFighter.Effects.ResourceLocationAccessors.ContextRegisters,
asm: Assembly-CSharp}
- rid: 7043444593006739542
type: {class: Fatigue, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739543
- rid: 7043444593006739645
asm: Assembly-CSharp}
- rid: 7043444593006739575
type: {class: AoeEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
data:
Shape:
rid: 7043444593006739579
- rid: 7043444593006739579
type: {class: Circle, ns: TagFighter.Effects.AoeShapes, asm: Assembly-CSharp}
data:
Radius:
Resource:
rid: 7043444593006739582
Location:
rid: 7043444593006739583
Multiplier: 1
Addend: 15
- rid: 7043444593006739582
type: {class: Pain, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739583
type: {class: Context, ns: TagFighter.Effects.ResourceLocationAccessors.Get,
data:
Register:
rid: 7043444593006739584
- rid: 7043444593006739584
type: {class: Current, ns: TagFighter.Effects.ResourceLocationAccessors.ContextRegisters,
asm: Assembly-CSharp}
- rid: 7043444593006739592
type: {class: DelayedEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
- rid: 7043444546427682816
type: {class: ReleaseEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
- rid: 7043444579999678513
type: {class: DelayedEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
- rid: 7043444583699054625
- rid: 7043444593006739612
type: {class: AoeEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
data:
Shape:
rid: 7043444593006739634
- rid: 7043444593006739618
Resource:
rid: 7043444593006739545
Location:
rid: 7043444593006739546
Multiplier: 1
Addend: 0
To:
Resource:
rid: 7043444593006739548
Location:
rid: 7043444593006739549
Multiplier: 1
Addend: 0
- rid: 7043444583699054631
type: {class: DelayedEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
- rid: 7043444593006739523
type: {class: BinaryResourceEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
data:
Operator:
rid: 7043444593006739561
FromA:
Resource:
rid: 7043444593006739552
Location:
rid: 7043444593006739553
Multiplier: 1
Addend: 0
FromB:
Addend: 0
- rid: 7043444593006739545
type: {class: GreenTag, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739546
type: {class: Pawn, ns: TagFighter.Effects.ResourceLocationAccessors.Get, asm: Assembly-CSharp}
data:
Property:
rid: 7043444593006739547
- rid: 7043444593006739547
type: {class: Current, ns: TagFighter.Effects.ResourceLocationAccessors.PawnProperties,
asm: Assembly-CSharp}
- rid: 7043444593006739548
type: {class: Pain, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739549
type: {class: Context, ns: TagFighter.Effects.ResourceLocationAccessors.Set,
asm: Assembly-CSharp}
data:
Register:
rid: 7043444593006739550
SetAs:
rid: 7043444593006739551
- rid: 7043444593006739550
type: {class: Current, ns: TagFighter.Effects.ResourceLocationAccessors.ContextRegisters,
asm: Assembly-CSharp}
- rid: 7043444593006739551
type: {class: Sum, ns: TagFighter.Effects.Operators, asm: Assembly-CSharp}
- rid: 7043444593006739552
type: {class: Pain, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739553
type: {class: Context, ns: TagFighter.Effects.ResourceLocationAccessors.Get,
asm: Assembly-CSharp}
data:
Register:
rid: 7043444593006739554
- rid: 7043444593006739554
type: {class: Current, ns: TagFighter.Effects.ResourceLocationAccessors.ContextRegisters,
asm: Assembly-CSharp}
- rid: 7043444593006739555
type: {class: Pain, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739556
Addend: 5
- rid: 7043444593006739620
- rid: 7043444593006739561
type: {class: Sum, ns: TagFighter.Effects.Operators, asm: Assembly-CSharp}
- rid: 7043444593006739580
type: {class: AoeEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
data:
_areaOfEffect:
rid: -2
Shape:
rid: 7043444593006739581
- rid: 7043444593006739581
type: {class: Circle, ns: TagFighter.Effects.AoeShapes, asm: Assembly-CSharp}
- rid: 7043444593006739630
type: {class: DelayedEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
- rid: 7043444593006739632
type: {class: RedTag, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 7043444593006739633
type: {class: TransientWeave, ns: TagFighter.Effects, asm: Assembly-CSharp}