private void PerformBuffOnEntity(Entities.Entity entity) { Entities.Unit unit = (Unit)entity; if (mModules != null) { unit.AddModulesFromData(mModules); } if (mStatusTags != null) { foreach (StatusOperationPair pair in mStatusTags) { if (pair.mShouldAdd) { if (!unit.HasStatus(pair.mTag)) { unit.AddStatus(pair.mTag); } } else { unit.RemoveStatus(pair.mTag); } } } unit.TemporaryHP += mTempHPBuff; }
public void Run() { if (mConditions.Check(mParent)) { mParent.AttackModifier += mAttackBuff; mParent.AttackCostModifier += mAttackCostBuff; if (mStatus != null && !mParent.HasStatus(mStatus)) { mParent.AddStatus(mStatus); } } }
protected override bool CheckValidityInternal(Entities.Entity Performer, List <Entities.Entity> Selection, TurnInfo TI) { Entities.Unit attacker = (Entities.Unit)Performer; Entities.Unit target = (Entities.Unit)Selection[0]; if (Performer.IsUnit() && Selection[0].IsUnit() && Performer.GetOwnerIndex() != Selection[0].GetOwnerIndex() && TI.GetCPI() == Performer.GetOwnerIndex() && !attacker.HasStatus("Can't attack")) { return(attacker.CanAttack(target) != -1); } else { return(false); } }