[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src actions.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src actions.cpp |
Date: |
Sun, 29 May 2005 21:53:58 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 05/05/30 01:53:58
Modified files:
src : actions.cpp
Log message:
reverted 'berserk' ability to be active on defense
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.222&tr2=1.223&r1=text&r2=text
Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.222 wesnoth/src/actions.cpp:1.223
--- wesnoth/src/actions.cpp:1.222 Sun May 15 16:02:29 2005
+++ wesnoth/src/actions.cpp Mon May 30 01:53:56 2005
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.222 2005/05/15 16:02:29 ott Exp $ */
+/* $Id: actions.cpp,v 1.223 2005/05/30 01:53:56 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -271,7 +271,7 @@
const int swa, const int hpb, const int dmgb, const double pb,
const int swb, const int n, const bool second)
{
- if ((swa < swb) and (swa < (n-1) % swb + 1)) // not our move
+ if ((swa < swb) && (swa < (n-1) % swb + 1)) // not our move
return 0.0;
// A kills B during swing n, and is it second?
// take into account where one unit doesn't get all n swings
@@ -404,7 +404,11 @@
res.damage_attacker_takes = 0;
if (counterattack) {
const attack_type& defend = defender_attacks[defend_with];
- res.defender_special = defend.special();
+ res.defender_special = defend.special();
+
+ if(res.defender_special == to_the_death_string) {
+ res.to_the_death = true;
+ }
//magical attacks always have a 70% chance to hit
if (res.defender_special == magical_string) {
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp, ott, 2005/05/10
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp, John McNabb, 2005/05/13
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp, ott, 2005/05/13
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp, ott, 2005/05/13
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp, ott, 2005/05/13
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp, ott, 2005/05/14
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp, ott, 2005/05/16
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp,
David White <=
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp, David White, 2005/05/29