public SplashPas(string pName, float fNearRange, Coeff roExNearDamage, float fFarRange, Coeff roExFarDamage, UnitEventTrigger dwTriggerMask = UnitEventTrigger.kTriggerOnAttackTargetTrigger, ForceEffective dwEffectiveTypeFlags = ForceEffective.kEnemy) : base(pName, 0) { m_fNearRange = fNearRange; m_oExNearDamage = roExNearDamage; m_fFarRange = fFarRange; m_oExFarDamage = roExFarDamage; m_dwTriggerMask = dwTriggerMask; m_effectiveTypeFlags = dwEffectiveTypeFlags; SetTriggerFlags(UnitEventTrigger.kTriggerOnAttackTargetTrigger); }
// the result of 'this.canEffect(force)' is not always same as 'force.canEffect(this)' // it ONLY means that 'this' can effect 'force' public bool CanEffect(UnitForce force, ForceEffective effectiveTypeFlags) { return(((this == force) && (effectiveTypeFlags & ForceEffective.kSelf) != 0) || ((this != force) && (this.IsMyAlly(force) && (effectiveTypeFlags & ForceEffective.kAlly) != 0)) || (this.IsMyEnemy(force) && (effectiveTypeFlags & ForceEffective.kEnemy) != 0)); }
public ActiveSkill(string name, float coolDown, CommandTarget.Type castType = CommandTarget.Type.kNoTarget, ForceEffective effectiveTypeFlags = ForceEffective.kSelf | ForceEffective.kOwn | ForceEffective.kAlly | ForceEffective.kEnemy) : base(name, coolDown) { m_castTargetType = castType; m_effectiveTypeFlags = effectiveTypeFlags; }