Skip to content

Commit

Permalink
MAJ Function (Weapons.range)
Browse files Browse the repository at this point in the history
- Krak grenade special rule
- change Range condition
  • Loading branch information
Florian-DELRIEU committed Sep 14, 2021
1 parent f7b76b0 commit 270c4d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions W40K/FuncAndTables/Functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def setWeaponsBonus(Object):
if rule == "Blast 5'":
Object.SoftAttack *= 1.2
Object.HardAttack *= 1.05
if rule == "Krak Grenade":
Object.SoftAttack *= 0
# Weapons Cadence
Object.SoftAttack *= Object.Cadence
Object.HardAttack *= Object.Cadence
Expand All @@ -41,22 +43,27 @@ def setWeaponsBonus(Object):
Object.HardAttack *= 0.4
Object.Defense *= 0.4
Object.Breakthrought *= 0.4
elif Object.Range <= 12:
elif 8 < Object.Range >= 18:
Object.SoftAttack *= 0.6
Object.HardAttack *= 0.6
Object.Defense *= 0.6
Object.Breakthrought *= 0.6
elif Object.Range <= 18:
elif 18 < Object.Range >= 24:
Object.SoftAttack *= 0.8
Object.HardAttack *= 0.8
Object.Defense *= 0.8
Object.Breakthrought *= 0.8
elif Object.Range >= 30:
elif 24 < Object.Range >= 30:
Object.SoftAttack *= 1.2
Object.HardAttack *= 1.2
Object.Defense *= 1.2
Object.Breakthrought *= 1.2
elif Object.Range >= 36:
elif 30 < Object.Range >= 36:
Object.SoftAttack *= 1.4
Object.HardAttack *= 1.4
Object.Defense *= 1.4
Object.Breakthrought *= 1.4
elif 36 < Object.Range >= 48:
Object.SoftAttack *= 1.4
Object.HardAttack *= 1.4
Object.Defense *= 1.4
Expand Down
Binary file modified W40K/FuncAndTables/__pycache__/Functions.cpython-37.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion W40K/UnitCreator/Unit_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Lasgun = Weapon(3,None,"Tir rapide",24)
Bolter = Weapon(4,5,"Tir rapide",24)
PlasmaGun = Weapon(7,2,"Tir rapide",24)
KrakGrenades = Weapon(6,4,"Assaut",Range=8,Cadence=1)
KrakGrenades = Weapon(6,4,"Assaut",Range=8,Cadence=1,SpecialsRules=["Krak Grenade"])
FragGrenades = Weapon(3,None,"Assaut",Range=8,Cadence=1,SpecialsRules=["Blast 3'"])
BolterLD = Weapon(5,4,"Lourde",Range=36,Cadence=3)
CanonLaser = Weapon(9,1,"Lourde",Range=48,Cadence=1)

0 comments on commit 270c4d8

Please sign in to comment.