Computers and Technology
Computers and Technology, 28.11.2019 23:31, ally7366

Now we want a way to make our monsters fight! before two monsters can fight, we need to give two new class methods that update their stats. implement a method for "win_fight" and "lose_fight". win_fight should add 5 to the monster’s self. exp, and reset their current_hp to their max_hp. lose_fight should also reset their hp, but only adds 1 exp to self. exp. now write a function that takes two instances of the monster class as its input and makes them "fight". a fight goes as follows: the monster entered as the first function parameter always goes first. each monster takes a turn using one attack move. loop over all attacks from most powerful to least powerful attack until there is a winner. if there is a tie in hit points for an attack select using alphabetical order. an attack is always successful and decreases the opponent’s current_hp by the given number of points. monsters continue taking turns until one of them reaches current_hp less than or equal to 0, at which point the win_fight and lose_fight methods should be invoked. once the fight is complete, return the round number in which the fight ended, the monster that won and the list of attacks the winning monster used. if both monsters only have "wait" as an attack, return -1, none, none

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:00, jumpgirll
The blank button automatically displays next to the data when you select a range of numeric data which is an available option for creating a chart
Answers: 3
image
Computers and Technology, 23.06.2019 12:00, muncyemily
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
image
Computers and Technology, 23.06.2019 23:30, jamalchris9353
Worth 50 points answer them bc i am not sure if i am wrong
Answers: 1
image
Computers and Technology, 24.06.2019 06:30, hannahgracew12
Some peer-to-peer networks have a server and some don't. true false
Answers: 2
Do you know the correct answer?
Now we want a way to make our monsters fight! before two monsters can fight, we need to give two new...

Questions in other subjects:

Konu
Mathematics, 24.08.2019 17:50
Konu
Mathematics, 24.08.2019 17:50
Konu
Mathematics, 24.08.2019 17:50
Konu
Mathematics, 24.08.2019 17:50