1 ########################################################
2 # Copyright (c) 2006 Russ Adams, Sean Eubanks, Asgard Contributors
3 # This file is part of Asgard.
4 # Asgard is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # Asgard is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with Asgard; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 ########################################################
21 def __init__(self
,head
,armor
,l
,r
):
32 """Change head armor."""
40 """Change body armor."""
44 """Get left arm weapon/armor."""
48 """Change left arm weapon/armor."""
52 """Get right arm weapon/armor."""
56 """Change right arm weapon/armor."""
59 def computeAtkMod(self
):
60 """Compute attack modifier."""
61 # Left/Right Attack Mods
62 if self
.__left
== 'Sword' or self
.__right
== 'Sword':
64 elif self
.__left
== 'Katana' or self
.__right
== 'Katana':
66 elif self
.__left
== 'Bow' or self
.__right
== 'Bow':
68 elif self
.__left
== 'Staff' or self
.__right
== 'Staff':
72 def computeDefMod(self
):
73 """Compute defense modifier."""
77 if self
.__head
== 'Helm':
79 # Left/Right Defense Mods
80 if self
.__left
== 'Shield' or self
.__right
== 'Shield':
83 if self
.__armor
== 'Chain Mail':
85 elif self
.__armor
== 'Cloak':
90 def computeEvaMod(self
):
91 """Compute evasion modifier."""
94 # Left/Right Evasion Mods
95 if self
.__left
== 'Shield' or self
.__right
== 'Shield':
97 if self
.__left
== 'Sword' or self
.__right
== 'Sword':
99 if self
.__left
== 'Katana' or self
.__right
== 'Katana':
101 if self
.__left
== 'Staff' or self
.__right
== 'Staff':
104 if self
.__armor
== 'Chain Mail':
106 elif self
.__armor
== 'Cloak':