- This event has passed.
6 PM – Python OOP – Bill
November 19, 2022 @ 6:00 pm - 7:00 pm
Today We:
- Continued working on the monster inheritence project
- Made a new attack menu for the selected_monster
- Added the Sword Attack functionality
Your HW:
- Inside the monster class, create a new method called receive_magic_attack with 2 parameters:
- Damage
- Magic_Type
- Inside the main, create a new attribute called magic_attack_menu
-
What kind of magic attack you want to do: 1. Fire magic - Max damage: 10 2. Water magic - Max damage: 10 3. Earth magic - Max damage: 15 4. Wind magic - Max damage: 8 Enter your selection:
-
- If the user enters “1” when asked which attack they want to deal, ask the user what magic attack they want to do with the new magic_attack_menu
- Then deal a random ammount of damage from 1 to the respective max damage of each magic attack to the monster using the receive_magic_attack method
Reminder:
No class next week, Happy Thanksgiving!
Classes resume after Nov. 27