예제 #1
0
 public Servant Attack(Servant target)
 {
     var answer = ExecuteService.Execute(ExecuteTimePoint.BeforeServantAttack, this, target);
     if (answer.CancelNextWhenMaskIs != 0) return this;
     //TODO: 在这里播放攻击动画
     target.Definition.LifePoint -= Definition.AttackPoint;
     if (target.Definition.LifePoint <= 0) target.Compress();
     Definition.LifePoint -= target.Definition.AttackPoint / 2;
     if (Definition.LifePoint <= 0) Compress();
     ExecuteService.Execute(ExecuteTimePoint.AfterServantAttack, this, target);
     return this;
 }
예제 #2
0
 public static Servant SetServant(Servant servant, string name, Code[] codes)
 {
     return servant.SetServant(name, codes);
 }