American Young Coder Academy – Indo

Loading Events

« All Events

  • This event has passed.

6 PM – Python OOP – Gamas

March 22, 2023 @ 6:00 pm - 7:00 pm

Today We Did
  1. We continued with Monster Inheritance.
  2. We added Adventure Menu: Magic Attack and Sword Attack.
  3. When the user choose “Sword Attack” the monster, the player will damage the monster with damage ranges between 10 to 20. And the monster will also damage the player between 5 to monster.max_damage
Homework
  1. During sword attack, in the class, we added the code that would print the player attack the monster and display the monster remaining health. Add a print out that would print “<Monster Species> attacked <Player Name> with <monster random attack> attack points. <Player Name> remaining health is <Player Health>.” . Replaced the <Monster Species>, <Player Name>, <monster random attack> and <Player Health> accordingly.
  2. Add code when user selected Magic Damage, the program will display magic attack menus
  3. Welcome to AYC Logic adventure game
    1. Add new monster
    2. List all monsters
    3. Start adventure
    Please make your selection. Enter "quit" to exit: 3
    
    Enter player's name: Gamas
    Enter player's health: 100
    
    Gamas welcome to AYC Logic Adventure game.
    You have 100 health remaining
    
    Please choose which monster to fight: 
    - Dragon - 100 health - 100 max damage
    - Troll - 75 health - 50 max damage
    - Water Golem - 50 health - 50 max damage
    Enter your selection (enter 'exit' to quit): Dragon
    
    What do you want to do with Dragon:
    1. Magic attack
    2. Sword attack
    Please enter your selection (1 or 2): 2
    
    What do you want to do with Dragon:
    1. Magic attack
    2. Sword attack
    Please enter your selection (1 or 2): 2
    
    Gamas attacked Dragon with 16 attack points. Dragon has 84 health remaining.
    
    Dragon attacked Gamas with 16 attack points. Gamas remaining health is 84.
    
    Gamas welcome to AYC Logic Adventure game.
    You have 84 health remaining
    
    Please choose which monster to fight: 
    - Dragon - 84 health - 100 max damage
    - Troll - 75 health - 50 max damage
    - Water Golem - 50 health - 50 max damage
    Enter your selection (enter 'exit' to quit): Dragon
    
    What do you want to do with Dragon:
    1. Magic attack
    2. Sword attack
    Please enter your selection (1 or 2): 1
    
    What kind of magic attack you want to use:
    1. Fire magic - Damage: 5 to 20
    2. Water magic - Damage: 7 to 13
    3. Earth magic - Damage: 10 to 15
    4. Wind magic - Damage: 8 to 11
    Enter your selection:

Details

Date:
March 22, 2023
Time:
6:00 pm - 7:00 pm
Event Categories:
,
Verified by MonsterInsights