Skip to content

Instantly share code, notes, and snippets.

@aurorapar
Created August 23, 2016 05:13
Show Gist options
  • Save aurorapar/d311addb08b782144f43e59736f122ba to your computer and use it in GitHub Desktop.
Save aurorapar/d311addb08b782144f43e59736f122ba to your computer and use it in GitHub Desktop.
if dndPlayers[vindex]['shield'] > 0:
if dndPlayers[vindex]['shield'] >= damage:
dndPlayers[vindex]['shield'] -= damage
victim.health += damage
playerMessage(vindex, 'Your shield blocked %s damage'%damage)
else:
victim.health += dndPlayers[vindex]['shield']
playerMessage(vindex, 'Your shield blocked %s damage and is now depeleted'%dndPlayers[vindex]['shield'])
dndPlayers[vindex]['shield'] = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment