public void HandleChallengeResult(TroopDamage damage, int result, Troop sourceTroop, Person sourcePerson, Troop destinationTroop, Person destinationPerson) { Session.MainGame.mainGameScreen.TroopPersonChallenge(result, sourceTroop, sourcePerson, destinationTroop, destinationPerson); switch (result) { case 1: //P1武将胜利 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, sourcePerson, destinationPerson, "被打下馬"); damage.SourceMoraleChange += 20; damage.DestinationMoraleChange -= 20; damage.SourceCombativityChange += 20; damage.DestinationCombativityChange -= 20; //第2只军队战意下降 break; case 2: //2:P2武将胜利 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, destinationPerson, sourcePerson, "被打下馬"); damage.SourceMoraleChange -= 20; damage.DestinationMoraleChange += 20; damage.SourceCombativityChange -= 20; damage.DestinationCombativityChange += 20; break; case 3: //3:P1武将被杀 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, destinationPerson, sourcePerson, "被擊殺"); this.challengePersonDie(sourcePerson, sourceTroop, destinationPerson); damage.SourceMoraleChange -= 30; damage.DestinationMoraleChange += 30; damage.SourceCombativityChange -= 30; damage.DestinationCombativityChange += 30; break; case 4: //4:P2武将被杀 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, sourcePerson, destinationPerson, "被擊殺"); this.challengePersonDie(destinationPerson, destinationTroop, sourcePerson); damage.SourceMoraleChange += 30; damage.DestinationMoraleChange -= 30; damage.SourceCombativityChange += 30; damage.DestinationCombativityChange -= 30; break; case 5: //5:P1武将逃跑 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, destinationPerson, sourcePerson, "逃跑"); damage.SourceMoraleChange -= 20; damage.DestinationMoraleChange += 20; break; case 6: //6:P2武将逃跑 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, sourcePerson, destinationPerson, "逃跑"); damage.SourceMoraleChange += 20; damage.DestinationMoraleChange -= 20; break; case 7: //7、P1武将被俘虏 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, destinationPerson, sourcePerson, "被俘虜"); destinationTroop.CatchCaptiveFromTroop(sourcePerson); sourceTroop.RefreshAfterLosePerson(); damage.SourceMoraleChange -= 20; damage.DestinationMoraleChange += 20; damage.SourceCombativityChange -= 20; damage.DestinationCombativityChange += 20; break; case 8: //8、P2武将被俘虏 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, sourcePerson, destinationPerson, "被俘虜"); sourceTroop.CatchCaptiveFromTroop(destinationPerson); destinationTroop.RefreshAfterLosePerson(); damage.SourceMoraleChange += 20; damage.DestinationMoraleChange -= 20; damage.SourceCombativityChange += 20; damage.DestinationCombativityChange -= 20; break; case 9: //9、P1武将被说服 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, destinationPerson, sourcePerson, "被说服"); destinationPerson.ConvincePersonSuccess(sourcePerson); damage.SourceCombativityChange -= 30; damage.DestinationCombativityChange += 30; break; case 10: //10、P2武将被说服 Session.Current.Scenario.YearTable.addChallengeEntry(Session.Current.Scenario.Date, sourcePerson, destinationPerson, "被说服"); sourcePerson.ConvincePersonSuccess(destinationPerson); damage.SourceCombativityChange += 30; damage.DestinationCombativityChange -= 30; break; case -1: //-1:平局 Session.Current.Scenario.YearTable.addChallengeDrawEntry(Session.Current.Scenario.Date, sourcePerson, destinationPerson); break; case -2: //-2:平局:P1武将被杀 Session.Current.Scenario.YearTable.addChallengeDrawKilledEntry(Session.Current.Scenario.Date, destinationPerson, sourcePerson); this.challengePersonDie(sourcePerson, sourceTroop, destinationPerson); break; case -3: //-3:平局:P2武将被杀 Session.Current.Scenario.YearTable.addChallengeDrawKilledEntry(Session.Current.Scenario.Date, sourcePerson, destinationPerson); this.challengePersonDie(destinationPerson, destinationTroop, sourcePerson); break; case -4: //-4:平局:双方武将被杀 Session.Current.Scenario.YearTable.addChallengeDrawBothKilledEntry(Session.Current.Scenario.Date, sourcePerson, destinationPerson); this.challengePersonDie(sourcePerson, sourceTroop, destinationPerson); this.challengePersonDie(destinationPerson, destinationTroop, sourcePerson); break; } }
internal void HandleChallengeResult(TroopDamage damage, int result, Troop sourceTroop, Person sourcePerson, Troop destinationTroop, Person destinationPerson, GameScenario scenario) { scenario.GameScreen.TroopPersonChallenge(result, sourceTroop, sourcePerson, destinationTroop, destinationPerson); switch (result) { case 1: //P1武将胜利 damage.SourceMoraleChange += 20; damage.DestinationMoraleChange -= 20; damage.SourceCombativityChange += 20; damage.DestinationCombativityChange -= 20; //第2只军队战意下降 break; case 2: //2:P2武将胜利 damage.SourceMoraleChange -= 20; damage.DestinationMoraleChange += 20; damage.SourceCombativityChange -= 20; damage.DestinationCombativityChange += 20; break; case 3: //3:P1武将被杀 this.challengePersonDie(sourcePerson, sourceTroop); damage.SourceMoraleChange -= 30; damage.DestinationMoraleChange += 30; damage.SourceCombativityChange -= 30; damage.DestinationCombativityChange += 30; break; case 4: //4:P2武将被杀 this.challengePersonDie(destinationPerson, destinationTroop); damage.SourceMoraleChange += 30; damage.DestinationMoraleChange -= 30; damage.SourceCombativityChange += 30; damage.DestinationCombativityChange -= 30; break; case 5: //5:P1武将逃跑 damage.SourceMoraleChange -= 20; damage.DestinationMoraleChange += 20; break; case 6: //6:P2武将逃跑 damage.SourceMoraleChange += 20; damage.DestinationMoraleChange -= 20; break; case 7: //7、P1武将被俘虏 destinationTroop.CatchCaptiveFromTroop(sourcePerson); sourceTroop.RefreshAfterLosePerson(); damage.SourceMoraleChange -= 20; damage.DestinationMoraleChange += 20; damage.SourceCombativityChange -= 20; damage.DestinationCombativityChange += 20; break; case 8: //8、P2武将被俘虏 sourceTroop.CatchCaptiveFromTroop(destinationPerson); destinationTroop.RefreshAfterLosePerson(); damage.SourceMoraleChange += 20; damage.DestinationMoraleChange -= 20; damage.SourceCombativityChange += 20; damage.DestinationCombativityChange -= 20; break; case 9: //9、P1武将被说服 destinationPerson.ConvincePersonSuccess(sourcePerson); damage.SourceCombativityChange -= 30; damage.DestinationCombativityChange += 30; break; case 10: //10、P2武将被说服 sourcePerson.ConvincePersonSuccess(destinationPerson); damage.SourceCombativityChange += 30; damage.DestinationCombativityChange -= 30; break; case -1: //-1:平局 break; case -2: //-2:平局:P1武将被杀 this.challengePersonDie(sourcePerson, sourceTroop); break; case -3: //-3:平局:P2武将被杀 this.challengePersonDie(destinationPerson, destinationTroop); break; case -4: //-4:平局:双方武将被杀 this.challengePersonDie(sourcePerson, sourceTroop); this.challengePersonDie(destinationPerson, destinationTroop); break; } }