public override void setProperty(BattleConsts.Property propId, object value)
 {
     switch (propId)
     {
         case BattleConsts.Property.TranslateTarget:
             this.target = (Unit)value;
             break;
         case BattleConsts.Property.TranslateOriginalRow:
             this.originalRow = (int)value;
             break;
         case BattleConsts.Property.TranslateOriginalCol:
             this.originalCol = (int)value;
             break;
         case BattleConsts.Property.TranslateOffsetRow:
             this.offsetRow = (int)value;
             break;
         case BattleConsts.Property.TranslateOffsetCol:
             this.offsetCol = (int)value;
             break;
         case BattleConsts.Property.TranslateTargetRow:
             this.targetRow = (int)value;
             break;
         case BattleConsts.Property.TranslateTargetCol:
             this.targetCol = (int)value;
             break;
     }
 }
 public void addPropertyValue(BattleConsts.Property propId, object value)
 {
     switch ( propId )
     {
         case BattleConsts.Property.BPointCostExtra:
             this.bPointCostExtra += (int)value;
             break;
     }
 }
Example #3
0
 public void setProperty(BattleConsts.Property propId, object value)
 {
     switch ( propId )
     {
         case BattleConsts.Property.DamageAttacker:
             this.attacker = (Unit)value;
             break;
     }
 }
 public override object getProperty(BattleConsts.Property propId)
 {
     switch (propId)
     {
         case BattleConsts.Property.AttackAttacker:
             return this.attacker;
         case BattleConsts.Property.AttackDefender:
             return this.defender;
         default:
             throw new NotImplementedException();
     }
 }
 public override void setProperty(BattleConsts.Property propId, object value)
 {
     switch (propId)
     {
         case BattleConsts.Property.AttackAttacker:
             this.attacker = (Unit)value;
             break;
         case BattleConsts.Property.AttackDefender:
             this.defender = (Unit)value;
             break;
     }
 }
 public object getProperty(BattleConsts.Property propId)
 {
     switch ( propId )
     {
         case BattleConsts.Property.TranslateTarget:
             return this.target;
         case BattleConsts.Property.TranslateOffsetRow:
             return this.offsetRow;
         case BattleConsts.Property.TranslateOffsetCol:
             return this.offsetCol;
     }
     return null;
 }
 public void getEffectsByCode(BattleConsts.Code code,List<ISkillEffect> effects)
 {
     int count = this._effectList.Count;
     ISkillEffect effect;
     for (int i = 0; i < count; i++)
     {
         effect = this._effectList[i];
         if ( effect.getCode() == code )
         {
             effects.Add(effect);
         }
     }
 }
 public override object getProperty(BattleConsts.Property propId)
 {
     switch (propId)
     {
         case BattleConsts.Property.SummoningUnit:
             return this.summoningUnit;
         case BattleConsts.Property.SummoningPos:
             return this.summoningPos;
         case BattleConsts.Property.SummoningReason:
             return this.summoningReason;
         default:
             throw new NotImplementedException();
     }
 }
 //public
 public void addPropertyValue(BattleConsts.Property propId, object value)
 {
     switch (propId)
     {
     case BattleConsts.Property.MinAttackDisExtra:
         this.minDisExtra += (int)value;
         break;
     case BattleConsts.Property.MaxAttackDisExtra:
         this.maxDisExtra += (int)value;
         break;
     default:
         throw new NotImplementedException();
     }
 }
 public void addPropertyValue(BattleConsts.Property propId, object value)
 {
     switch (propId)
     {
         case BattleConsts.Property.BPointCostBase:
             this.costBase += (int)value;
             break;
         case BattleConsts.Property.BPointCostExtra:
             this.costBaseExtra += (int)value;
             break;
         default:
             throw new NotImplementedException();
     }
 }
 public override void setProperty(BattleConsts.Property propId, object value)
 {
     switch (propId)
     {
         case BattleConsts.Property.SummoningUnit:
             this.summoningUnit = (Unit)value;
             break;
         case BattleConsts.Property.SummoningPos:
             this.summoningPos = (int)value;
             break;
         case BattleConsts.Property.SummoningReason:
             this.summoningReason = (int)value;
             break;
     }
 }
 public object getProperty(BattleConsts.Property propId)
 {
     switch (propId)
     {
     case BattleConsts.Property.AttackAttacker:
         return this.attacker;
     case BattleConsts.Property.AttackDefender:
         return this.defender;
     case BattleConsts.Property.MinAttackDisExtra:
         return this.minDisExtra;
     case BattleConsts.Property.MaxAttackDisExtra:
         return this.maxDisExtra;
     default:
         throw new NotImplementedException();
     }
 }
 public object getProperty(BattleConsts.Property propId)
 {
     switch ( propId )
     {
         case BattleConsts.Property.PlayerId:
             return this.playerId;
         case BattleConsts.Property.UnitId:
             return this.unitId;
         case BattleConsts.Property.BPointCostBase:
             return this.costBase;
         case BattleConsts.Property.BPointCostExtra:
             return this.costBaseExtra;
         case BattleConsts.Property.BPointCostCurrent:
             return this.costCurrent;
         default:
             throw new NotImplementedException();
     }
 }
Example #14
0
 public object getProperty(BattleConsts.Property propId)
 {
     switch (propId)
     {
         case BattleConsts.Property.DamageAttacker:
             return this.attacker;
         case BattleConsts.Property.DamageVictim:
             return this.victim;
         case BattleConsts.Property.CalcPhysicalDamage:
             return this.phycicsDamage;
         case BattleConsts.Property.CalcSpellDamage:
             return this.spellDamage;
         case BattleConsts.Property.CalcHpRemoval:
             return this.hpRemoval;
         case BattleConsts.Property.DamageReason:
             return this.damageReason;
         default:
             throw new NotImplementedException();
     }
 }
 //public
 public void addPropertyValue(BattleConsts.Property propId, object value)
 {
     switch (propId)
     {
         case BattleConsts.Property.PhysicalDamage:
             this.physicalDamage += (int)value;
             break;
         case BattleConsts.Property.PhysicalDamageBaseOutgoing:
             this.physicalDamageBaseOutgoing += (int)value;
             break;
         case BattleConsts.Property.PhysicalDamagePercentage:
             this.physicalDamageExtraOutgoing += (int)value;
             break;
         case BattleConsts.Property.PhysicalDamageExtraOutgoing:
             this.physicalDamageExtraOutgoing += (int)value;
             break;
         case BattleConsts.Property.SpellDamage:
             this.spellDamage += (int)value;
             break;
         case BattleConsts.Property.SpellDamageBaseOutgoing:
             this.spellDamageBaseOutgoing += (int)value;
             break;
         case BattleConsts.Property.SpellDamagePercentage:
             this.spellDamagePercentage += (int)value;
             break;
         case BattleConsts.Property.SpellDamageExtraOutgoing:
             this.spellDamageExtraOutgoing += (int)value;
             break;
         case BattleConsts.Property.TotalDamageReduction:
             this.totalDamageReduction += (int)value;
             break;
         case BattleConsts.Property.PhysicalDamageReduction:
             this.physicalDamageReduction += (int)value;
             break;
         case BattleConsts.Property.SpellDamageReduction:
             this.spellDamageReduction += (int)value;
             break;
         default:
             throw new NotImplementedException();
     }
 }
 public override object getProperty(BattleConsts.Property propId)
 {
     switch (propId)
     {
         case BattleConsts.Property.TranslateTarget:
             return this.target;
         case BattleConsts.Property.TranslateOriginalRow:
             return this.originalRow;
         case BattleConsts.Property.TranslateOriginalCol:
             return this.originalCol;
         case BattleConsts.Property.TranslateOffsetRow:
             return this.offsetRow;
         case BattleConsts.Property.TranslateOffsetCol:
             return this.offsetCol;
         case BattleConsts.Property.TranslateTargetRow:
             return this.targetRow;
         case BattleConsts.Property.TranslateTargetCol:
             return this.targetCol;
         default:
             throw new NotImplementedException();
     }
 }
 public object getProperty(BattleConsts.Property propId)
 {
     switch (propId)
     {
         case BattleConsts.Property.DamageReason:
             return this.damageReason;
         case BattleConsts.Property.DamageAttacker:
             return this.attacker;
         case BattleConsts.Property.DamageVictim:
             return this.victim;
         case BattleConsts.Property.PhysicalDamage:
             return this.physicalDamage;
         case BattleConsts.Property.PhysicalDamageBaseOutgoing:
             return this.physicalDamageBaseOutgoing;
         case BattleConsts.Property.PhysicalDamagePercentage:
             return this.physicalDamageExtraOutgoing;
         case BattleConsts.Property.PhysicalDamageExtraOutgoing:
             return this.physicalDamageExtraOutgoing;
         case BattleConsts.Property.SpellDamage:
             return this.spellDamage;
         case BattleConsts.Property.SpellDamageBaseOutgoing:
             return this.spellDamageBaseOutgoing;
         case BattleConsts.Property.SpellDamagePercentage:
             return this.spellDamagePercentage;
         case BattleConsts.Property.SpellDamageExtraOutgoing:
             return this.spellDamageExtraOutgoing;
         case BattleConsts.Property.TotalDamageReduction:
             return this.totalDamageReduction;
         case BattleConsts.Property.PhysicalDamageReduction:
             return this.physicalDamageReduction;
         case BattleConsts.Property.SpellDamageReduction:
             return this.spellDamageReduction;
         case BattleConsts.Property.HpRemoval:
             return this.hpRemoval;
         default:
             throw new NotImplementedException();
     }
 }
 public static EventVOBase createEventVO(BattleConsts.Code code)
 {
     EventVOBase vo = null;
     switch ( code )
     {
         case BattleConsts.Code.TakeDamage:
             vo = new TakeDamageEventVO();
             break;
         case BattleConsts.Code.Translate:
             vo = new TranslateTargetEventVO();
             break;
         case BattleConsts.Code.FlagAttackTarget:
             vo = new FlagAttackTargetEventVO();
             break;
         case BattleConsts.Code.PreCounterAttack:
             vo = new PreCounterAttackEventVO();
             break;
         case BattleConsts.Code.SummonUnitSuccess:
             vo = new SummonUnitSuccessEventVO();
             break;
     }
     return vo;
 }
 public static BattleEventBase createBattleEvent(BattleConsts.Code code,EventVOBase vo)
 {
     BattleEventBase evt = null;
     switch ( code )
     {
         case BattleConsts.Code.TakeDamage:
             evt = new TakeDamageEvent(vo);
             break;
         case BattleConsts.Code.Translate:
             evt = new TranslateTargetEvent(vo);
             break;
         case BattleConsts.Code.FlagAttackTarget:
             evt = new FlagAttackTargetEvent(vo);
             break;
         case BattleConsts.Code.PreCounterAttack:
             evt = new PreCounterAttackEvent(vo);
             break;
         case BattleConsts.Code.SummonUnitSuccess:
             evt = new SummonUnitSuccessEvent(vo);
             break;
     }
     return evt;
 }
 public override void setProperty(BattleConsts.Property propId, object value)
 {
     switch (propId)
     {
         case BattleConsts.Property.DamageAttacker:
             this.attacker = (Unit)value;
             break;
         case BattleConsts.Property.DamageVictim:
             this.victim = (Unit)value;
             break;
         case BattleConsts.Property.CalcPhysicalDamage:
             this.phycicsDamage = (int)value;
             break;
         case BattleConsts.Property.CalcSpellDamage:
             this.spellDamage = (int)value;
             break;
         case BattleConsts.Property.CalcHpRemoval:
             this.hpRemoval = (int)value;
             break;
         case BattleConsts.Property.DamageReason:
             this.damageReason = (int)value;
             break;
     }
 }
 public virtual object getEventVOProperty(BattleConsts.Property propId)
 {
     return this._eventVO != null ? this._eventVO.getProperty(propId) : null;
 }
 public void setProperty(BattleConsts.Property propId, object value)
 {
     throw new NotImplementedException();
 }
 public virtual object getProperty(BattleConsts.Property propId)
 {
     throw new NotImplementedException();
 }
 public void setCode(BattleConsts.Code value)
 {
     this._code = value;
 }
Example #25
0
 public void reset(BattleConsts.ResetType resetType)
 {
     if ( resetType == BattleConsts.ResetType.SelfTurnStart )
     {
         this._curAttackCount = 0;
         this._curCounterAttackCount = 0;
     }
 }
Example #26
0
 public void getBuffEffectsByCode(BattleConsts.Code code,List<ISkillEffect> effects)
 {
     int len = this._buffList.Count;
     BuffDataDriven buff;
     for (int i = 0; i < len; i++)
     {
         buff = this._buffList[i];
         buff.getEffectsByCode(code, effects);
     }
 }
 /// <summary>
 /// 添加lua函数的参数
 /// </summary>
 /// <param name="param">参数</param>
 /// <param name="paramType">参数类型</param>
 public void addParam(object param, BattleConsts.ParamType paramType)
 {
     this._params.Add(this.genLuaParam(param, paramType));
 }
 public object getProperty(BattleConsts.Property propId)
 {
     switch (propId)
     {
     case BattleConsts.Property.AttackAttacker:
         return this.attacker;
     case BattleConsts.Property.DamageVictim:
         return this.victim;
     default:
         throw new NotImplementedException();
     }
 }
 private LuaParam genLuaParam(object param, BattleConsts.ParamType paramType)
 {
     LuaParam luaParam = new LuaParam();
     luaParam.param = param;
     luaParam.paramType = paramType;
     return luaParam;
 }
 public void setState(BattleConsts.BattleState stateId)
 {
     this._nextStateId = stateId;
 }