/// <summary> /// 防具判定 /// </summary> /// <param name="p"></param> /// <param name="target"></param> /// <returns></returns> public bool CheckArmor(AbstractPlayer p, AbstractPlayer target) { // 判定防具 IArmor am = (IArmor)target.GetState().GetEquipment().GetArmor(); if (am == null || !am.Check(this, target)) { return(false); } return(true); }
/// <summary> /// 执行杀牌的杀流程 /// </summary> /// <param name="p"></param> /// <param name="toP"></param> public void ExecuteSha(AbstractPlayer p, AbstractPlayer toP) { if (!toP.GetAction().AvoidSha(p, this)) { // 如果使用者带武器,则调用武器的杀 AbstractWeaponCard awc = (AbstractWeaponCard)p.GetState() .GetEquipment().GetWeapons(); if (awc != null) { awc.ShaWithEquipment(p, toP, this); } else { // 判定防具 IArmor am = (IArmor)toP.GetState().GetEquipment().GetArmor(); if (am == null || !am.Check(this, toP)) { p.GetAction().Sha(toP); } } } p.RefreshView(); }