Question: Problem 3 Create a class called Enemy that has class variables damage _ multiplier, an int, and armor _ bonus, an int. The value for
Problem
Create a class called Enemy that has class variables damagemultiplier, an int, and armorbonus, an int. The value for damagemultiplier can
be hardcoded to and the value for armorbonus can be hardcoded to
The Enemy class should also have instance variables and basedamage. You should define a constructor that optionally takes two ints
corresponding to hp and basedamage. If no arguments are supplied, those values should default to and respectively.
Sample usage:
koopa Enemy
print koopahp
print koopabasedamage
Enemy.damagemultiplier
Enemy.armorbonus
kingkoopa Enemy
printkingkoopa.hp
printkingkoopa.basedamage
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
