[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth ./changelog src/actions.cpp
From: |
ott |
Subject: |
[Wesnoth-cvs-commits] wesnoth ./changelog src/actions.cpp |
Date: |
Thu, 11 Aug 2005 16:47:12 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: ott <address@hidden> 05/08/11 20:47:11
Modified files:
. : changelog
src : actions.cpp
Log message:
fix %-to-kill sometimes not being shown when it should be
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/changelog.diff?tr1=1.842&tr2=1.843&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/actions.cpp.diff?tr1=1.234&tr2=1.235&r1=text&r2=text
Patches:
Index: wesnoth/changelog
diff -u wesnoth/changelog:1.842 wesnoth/changelog:1.843
--- wesnoth/changelog:1.842 Thu Aug 11 15:12:02 2005
+++ wesnoth/changelog Thu Aug 11 20:47:11 2005
@@ -10,6 +10,7 @@
* fixed campaign dialog with no campaigns trying forever to download (#14078)
* fixed AI units not getting rest-healing, causing replay errors
* fixed game music continuing to play on the title screen (#14080)
+ * fixed some damage calculations not showing %-to-kill
* various bug fixes and code cleanups
Version 0.9.5:
Index: wesnoth/src/actions.cpp
diff -u wesnoth/src/actions.cpp:1.234 wesnoth/src/actions.cpp:1.235
--- wesnoth/src/actions.cpp:1.234 Mon Aug 8 22:59:19 2005
+++ wesnoth/src/actions.cpp Thu Aug 11 20:47:11 2005
@@ -1,4 +1,4 @@
-/* $Id: actions.cpp,v 1.234 2005/08/08 22:59:19 isaaccp Exp $ */
+/* $Id: actions.cpp,v 1.235 2005/08/11 20:47:11 ott Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -376,7 +376,7 @@
strings->attack_icon = attack.icon();
//don't show backstabbing unless it's actually happening
- if(attack.special() == backstab_string && !backstab)
+ if(res.attacker_special == backstab_string && !backstab)
strings->attack_special = "";
strings->range = gettext(attack.range() ==
attack_type::SHORT_RANGE ? N_("melee") : N_("ranged"));
@@ -408,6 +408,8 @@
static const std::string EMPTY_COLUMN = std::string(1,
COLUMN_SEPARATOR) + ' ' + COLUMN_SEPARATOR;
res.damage_attacker_takes = 0;
+ res.amount_attacker_drains = 0;
+ res.amount_defender_drains = 0;
if (counterattack) {
const attack_type& defend = defender_attacks[defend_with];
res.defender_special = defend.special();
@@ -500,8 +502,6 @@
//the defender will drain for half the damage it does
if (res.defender_special == drain_string &&
!a->second.type().not_living()) {
res.amount_defender_drains =
res.damage_attacker_takes/2;
- } else {
- res.amount_defender_drains = 0;
}
res.defender_plague = !a->second.type().not_living() &&
@@ -621,10 +621,8 @@
//if the attacker drains, and the defender is a living creature, then
//the attacker will drain for half the damage it does
- if(attack.special() == drain_string && !d->second.type().not_living()) {
+ if(res.attacker_special == drain_string &&
!d->second.type().not_living()) {
res.amount_attacker_drains = res.damage_defender_takes/2;
- } else {
- res.amount_attacker_drains = 0;
}
static const std::string slowed_string("slowed");
- [Wesnoth-cvs-commits] wesnoth ./changelog src/actions.cpp,
ott <=