American Young Coder (AYC)

Loading Events

« All Events

  • This event has passed.

5 PM – Intro to Java – William

August 1, 2023 @ 4:00 pm - 6:00 pm

Today we did:
  1. Reviewed Quiz and homework
  2. Continued MonsterInheritance project:
    1. initializeMonsters()
    2. addNewMonster()
    3. play()
      1. healMonster()
      2. meleeAttack()
      3. Started arrowAttack()
Homework:
  1. Finish arrowAttack()
    1. If monster has no more HP, print: “The (monster species) has been defeated”
    2. Player doesn’t take damage (since it’s a ranged attack)
  2. Start magicAttack()
    1. Implement the fire and water magic attacks
    2. The monster will do their max attack damage to player
    3. Implement your code however you want — I’ll critique it next lesson. Good luck!

NOTE: Add scanner.nextLine() on a new line each time you use scanner.nextInt().

What do you want to do with the Troll:
1. Magic attack
2. Melee attack
3. Arrow attack (5 -10 damage)
4. Heal
Enter your selection: 1

MAGIC ATTACK MONSTER
What kind of magic attack you want to do to Troll:
1. Fire magic - 10 damage
2. Water magic - 10 damage
3. Earth magic - 12 damage
4. Wind magic - 8 damage
Enter your selection: 1

You attacked Troll and did 10. Troll has 60 health remaining.
Troll attacked Will Smith and did 37 damage.

Will Smith has 963 health remaining.
Please select one of the following monsters:
- Troll - 60 health
- Dragon - 100 health
- Water Golem - 50 health
Enter your selection (Enter 'stop' to end the game): Troll

What do you want to do with the Troll:
1. Magic attack
2. Melee attack
3. Arrow attack (5 -10 damage)
4. Heal
Enter your selection: 1

MAGIC ATTACK MONSTER
What kind of magic attack you want to do to Troll:
1. Fire magic - 10 damage
2. Water magic - 10 damage
3. Earth magic - 12 damage
4. Wind magic - 8 damage
Enter your selection: 2

You attacked Troll and did 10 damage. The Troll has 50 health remaining.
Troll attacked Will Smith and did 53 damage.

Will Smith has 910 health remaining.
Please select one of the following monsters:
- Troll - 52 health
- Dragon - 100 health
- Water Golem - 50 health
Enter your selection (Enter 'stop' to end the game):

If you have any questions, please email me at williamsmith@ayclogic.com

Details

Date:
August 1, 2023
Time:
4:00 pm - 6:00 pm
Event Categories:
,
Verified by MonsterInsights