示例#1
0
"""
  Example Scenario
"""

# Create 3 characters
player = Warrior('Tyler')
ally = Knight('Lancelot')
enemy = Sorceress('Witch')

# Display beginning stats
player.display_stats()
enemy.display_stats()
ally.display_stats()

player.reckless_strike(enemy)
ally.critical_strike(enemy)

# Display stats after physical attacks
player.display_stats()
enemy.display_stats()
ally.display_stats()

# Test several spells
enemy.cast(enemy, enemy.spells['heal'])
enemy.cast(enemy, enemy.spells['invisible'])
enemy.cast(player, enemy.spells['missile'])
enemy.cast(player, enemy.spells['missile'])
enemy.cast(player, enemy.spells['missile'])
enemy.cast(player, enemy.spells['recover'])
enemy.spells['recover'].change_power(5)
enemy.spells['missile'].change_power(100)