Author: elias
Date: Fri Oct 3 17:03:56 2008
New Revision: 29828
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29828&view=rev
Log:
really fixed bug #12383
Modified:
trunk/data/tools/wmlunits
Modified: trunk/data/tools/wmlunits
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmlunits?rev=29828&r1=29827&r2=29828&view=diff
==============================================================================
--- trunk/data/tools/wmlunits (original)
+++ trunk/data/tools/wmlunits Fri Oct 3 17:03:56 2008
@@ -347,19 +347,12 @@
base_attacks = attacks[:]
for i, attack in enumerate(this_unit.get_all("attack")):
- aid = attack.get_text_val("name")
- if aid:
- # The attack does have a name - either merge with the base
- # which has the same name, or else append it as new attack.
- for already in base_attacks:
- if already.get_text_val("name") == aid:
- copy_attributes(attack, already)
- break
- else:
- attacks.append(attack)
+ # Attack merging is order based.
+ if i < len(base_attacks):
+ copy_attributes(attack, attacks[i])
else:
- # The attack has no name, so merge based on order.
- copy_attributes(attack, attacks[i])
+ attacks.append(attack)
+
return attacks
def write_units(self):
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits