[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: |
Fri, 17 Dec 2004 08:54:52 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 04/12/17 12:45:43
Modified files:
src : actions.cpp
Log message:
fixed bug in choosing which weapon to respond to an attack with
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.172&tr2=1.173&r1=text&r2=text
Patches:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.172 wesnoth/src/actions.cpp:1.173
--- wesnoth/src/actions.cpp:1.172 Sun Dec 5 22:14:29 2004
+++ wesnoth/src/actions.cpp Fri Dec 17 12:45:43 2004
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.172 2004/12/05 22:14:29 silene Exp $ */
+/* $Id: actions.cpp,v 1.173 2004/12/17 12:45:43 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -270,7 +270,7 @@
//don't show backstabbing unless it's actually happening
if(attack.special() == backstab_string && !backstab)
- strings->attack_special.clear();
+ strings->attack_special = "";
strings->range = gettext(attack.range() ==
attack_type::SHORT_RANGE ? N_("melee") : N_("ranged"));
}
@@ -282,7 +282,8 @@
for(int defend_option = 0; defend_option !=
int(defender_attacks.size()); ++defend_option) {
if(defender_attacks[defend_option].range() == attack.range() &&
defender_attacks[defend_option].hexes() >=
combat_range) {
- const double rating =
a->second.damage_against(defender_attacks[defend_option])
+ const double rating =
a->second.damage_against(defender_attacks[defend_option])
+
*defender_attacks[defend_option].damage()
*defender_attacks[defend_option].num_attacks()
*defender_attacks[defend_option].defense_weight();
if(defend_with == -1 || rating > best_defend_rating) {
- [Wesnoth-cvs-commits] wesnoth/src actions.cpp,
David White <=