示例#1
0
 //-----------------------
 //公有方法
 /// <summary>
 /// 对怪宣战
 /// </summary>
 /// <param name="enemy"></param>
 /// <returns></returns>
 public bool Trigger_WhenMonWarAnnounce(Mon_Card enemy)
 {
     this.MonToAttack = enemy;
     if (enemy.CanbeWarAnnouceAim == false)
     {
         //TellSomething tell = new TellSomething();
         //tell.tell(enemy.Name + "不可作为攻击宣言的对象");
         //tell.ShowDialog();
         return(false);
     }
     else
     {
         Player.MainPlaceInfo.Block_WhenMonWarAnnounce(this);
         if (WhenMonWarAnnounce_BeBlocked)
         {
             WhenMonWarAnnounce_BeBlocked = false;
             return(true);
         }
         else
         {
             Attack(enemy);
             return(false);
         }
     }
 }
示例#2
0
 /// <summary>
 /// 攻击动作
 /// </summary>
 /// <param name="enemy"></param>
 public virtual void Attack(Mon_Card enemy)
 {
     if (enemy is Mon_null)
     {
         //this.Player.MainPlaceInfo.MainFightPlace.textBox3.Text = "无效目标";
         return;
     }
     if (enemy.State == CardState.State_Att)
     {
         if (enemy.Att < this.Att)
         {
             //this.Player.MainPlaceInfo.MainFightPlace.textBox3.Text = this.Player.Name + this.Name + "击杀了" + this.Player.OpPlayer.Name + enemy.Name + "    " + this.Player.OpPlayer.Name + "HP-" + (this.Att - enemy.Att);
             Player.OpPlayer.PlayerHpMinus(this.Att - enemy.Att);
             enemy.Die_Reason = DieReason.War;
             enemy.Die();
         }
         else if (enemy.Att == this.Att)
         {
             //this.Player.MainPlaceInfo.MainFightPlace.textBox3.Text = this.Player.Name + this.Name + "、" + this.Player.OpPlayer.Name + enemy.Name + "同归于尽";
             enemy.Die_Reason = DieReason.War;
             enemy.Die();
             this.Die_Reason = DieReason.War;
             this.Die();
         }
         else
         {
             //this.Player.MainPlaceInfo.MainFightPlace.textBox3.Text = this.Player.Name + this.Name + "被" + this.Player.OpPlayer.Name + enemy.Name + "反杀" + "    " + this.Player.Name + "HP-" + (enemy.Att - this.Att);
             Player.PlayerHpMinus(enemy.Att - this.Att);
             this.Die_Reason = DieReason.War;
             this.Die();
         }
     }
     else if (enemy.State == CardState.State_Def)
     {
         if (this.Att > enemy.Def)
         {
             //this.Player.MainPlaceInfo.MainFightPlace.textBox3.Text = this.Player.Name + this.Name + "击杀" + this.Player.OpPlayer.Name + enemy.Name + "因其守备状态" + this.Player.Name + "不受到伤害";
             enemy.Die_Reason = DieReason.War;
             enemy.Die();
         }
         else if (this.Att == enemy.Def)
         {
             //this.Player.MainPlaceInfo.MainFightPlace.textBox3.Text = this.Player.Name + this.Name + "与" + this.Player.OpPlayer.Name + enemy.Name + "同归于尽";
             this.Die_Reason = DieReason.War;
             this.Die();
             enemy.Die_Reason = DieReason.War;
             enemy.Die();
         }
         else
         {
             //this.Player.MainPlaceInfo.MainFightPlace.textBox3.Text = this.Player.Name + this.Name + "受到来自" + this.Player.OpPlayer.Name + enemy.Name + "的反伤,死亡。" + this.Player.Name + "HP-" + (enemy.Def - this.Att);
             this.Die_Reason = DieReason.War;
             this.Die();
             this.Player.PlayerHpMinus(enemy.Def - this.Att);
         }
     }
     this.AttAllow_Rest--;
 }
示例#3
0
 public void Block_WhenMonWarAnnouceBlocked(Mon_Card mc)
 {
     if (Catch_WhenMonWarAnnouceBlocked.Count > 0)
     {
         for (int i = 0; i < Catch_WhenMonWarAnnouceBlocked.Count; i++)
         {
             Catch_WhenMonWarAnnouceBlocked[i](mc);
         }
     }
 }
示例#4
0
 public void Block_WhenMonChangeState(Mon_Card mc)
 {
     if (Catch_WhenMonChangeState.Count > 0)
     {
         for (int i = 0; i < Catch_WhenMonChangeState.Count; i++)
         {
             Catch_WhenMonChangeState[i](mc);
         }
     }
 }
示例#5
0
 public CallResult MonCall(Mon_Card mc)
 {
     if (place.Contains(mon_null))
     {
         int index = place.IndexOf(mon_null);
         place[index]       = mc;
         place[index].State = Card.CardState.State_Att;
         return(CallResult.Success);
     }
     else
     {
         return(CallResult.Full);
     }
 }