コード例 #1
0
 public Instant(
     AbilityName name,
     TurnPhase turnPhase,
     string displayName,
     string description,
     IList <EffectName> effects,
     IList <Research>?researchNeeded = null) : base(name, $"{nameof(Ability)}.{nameof(Instant)}", turnPhase, researchNeeded ?? new List <Research>(), true, displayName, description)
 {
     Effects = effects;
 }
コード例 #2
0
 public Target(
     AbilityName name,
     TurnPhase turnPhase,
     string displayName,
     string description,
     int distance,
     EffectName effect,
     IList <Research>?researchNeeded = null,
     EndsAt?cooldown = null) : base(name, $"{nameof(Ability)}.{nameof(Target)}", turnPhase, researchNeeded ?? new List <Research>(), true, displayName, description, cooldown)
 {
     Distance = distance;
     Effect   = effect;
 }
コード例 #3
0
 public Build(
     AbilityName name,
     string displayName,
     string description,
     int distance,
     IList <StructureName> selection,
     bool casterConsumesAction = false,
     bool canHelp = false) : base(name, $"{nameof(Ability)}.{nameof(Build)}", TurnPhase.Planning, new List <Research>(), true, displayName, description)
 {
     Distance             = distance;
     Selection            = selection;
     CasterConsumesAction = casterConsumesAction;
     CanHelp = canHelp;
 }
コード例 #4
0
 public Passive(
     AbilityName name,
     string displayName,
     string description,
     bool hasButton                   = false,
     EffectName?periodicEffect        = null,
     IList <Research>?researchNeeded  = null,
     IList <EffectName>?onHitEffects  = null,
     IList <Attacks>?onHitAttackTypes = null,
     EffectName?onBirthEffect         = null) : base(name, $"{nameof(Ability)}.{nameof(Passive)}", TurnPhase.Passive, researchNeeded ?? new List <Research>(), hasButton, displayName, description)
 {
     PeriodicEffect   = periodicEffect;
     OnHitEffects     = onHitEffects ?? new List <EffectName>();
     OnHitAttackTypes = onHitAttackTypes ?? new List <Attacks>();
     OnBirthEffect    = onBirthEffect;
 }
コード例 #5
0
 protected Ability(
     AbilityName name,
     string type,
     TurnPhase turnPhase,
     IList <Research> researchNeeded,
     bool hasButton,
     string displayName,
     string description,
     EndsAt?cooldown = null)
 {
     Name           = name;
     Type           = type;
     TurnPhase      = turnPhase;
     ResearchNeeded = researchNeeded;
     HasButton      = hasButton;
     Cooldown       = cooldown ?? EndsAt.Instant;
     DisplayName    = displayName;
     Description    = description;
 }