American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

9 AM – Python OOP – Gamas

August 23 @ 9:00 am - 10:00 am

Today We Did
  1. We continued with Monster Inheritance
Homework

Continue with Monster Inheritance project

  1. In magic attack, add code for monster to attack player. Monster attack should be between 5 to monster.max_attack.
  2. Also in magic_attack, add display the magic attack menu and player’s attack range would be between 5 to selected magic attack max attack
  3. Implement the sword attack mechanism.
  4. Example
  5. Gamas you have 55 health remaining.
    Please choose your monster: 
    - Dragon - 100 health - 50 Max attack
    - Troll - 50 health - 20 Max attack
    - Water Golem - 30 health - 20 Max attack
    - Cyclops - 60 health - 30 Max attack
    Enter your selection (enter 'stop' to quit the game): cyclops
    
    What do you want to do with the cyclops
    1. Magic attack
    2. Sword attack - 10 to 20 damage
    Enter your selection: 1
    
    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: 1
    You attacked Cyclops with 7 damage and the Cyclops has 53 health remaining.
    Cyclops attacked you with 7 attack points. Your remaining health is 48.
    
    Gamas you have 48 health remaining.
    Please choose your monster: 
    - Dragon - 100 health - 50 Max attack
    - Troll - 50 health - 20 Max attack
    - Water Golem - 30 health - 20 Max attack
    - Cyclops - 53 health - 30 Max attack
    Enter your selection (enter 'stop' to quit the game): troll
    
    What do you want to do with the troll
    1. Magic attack
    2. Sword attack - 10 to 20 damage
    Enter your selection: 2
    You attacked troll with 16 damage and the troll has 34 health remaining.
    troll attacked you with 10 damage. Your remaining health is 38.
    
    Gamas you have 38 health remaining.
    Please choose your monster: 
    - Dragon - 100 health - 50 Max attack
    - Troll - 34 health - 20 Max attack
    - Water Golem - 30 health - 20 Max attack
    - Cyclops - 53 health - 30 Max attack
    Enter your selection (enter 'stop' to quit the game):

Details

Date:
August 23
Time:
9:00 am - 10:00 am