- This event has passed.
5:30 PM – Python OOP – Gamas
October 5 @ 5:30 pm - 6:30 pm
Today We Did
- We continued with dragon class inheriting from Monster class.
- We added special behavior when dragon is attacked by fire magic
Homework
- Inside dragon.py, add code so when dragon is attacked by “water” magic, it will do double damage.
- “Dragon is weak against water magic. Therefore, the damage is doubled to 20 damage.”
- Inside water_golem.py, add code so when water golem is attacked by “earth” magic, it will do half damage.
- “Water Golem is resistance against earth magi.”Therefore,. the damage is halved to 5 damage.”
- Create a new file stone_golem.py
- Create a new class StoneGolem inherits Monster.
- Inside this new class, add a special behavior when StoneGolem is attacked by certain type of magic (up to you).