forked from ModDamage/ModDamage
-
Notifications
You must be signed in to change notification settings - Fork 0
Conditional: Number Comparison
1cec0ld edited this page Aug 5, 2012
·
3 revisions
Syntax: {integer} {comparison operator} {integer}
Description: Is true if the number comparison is true. See the Integer Variables page for more information.
Valid comparison operators are ==, !=, <, <=, >, >=.
Examples:
Damage: #Give a small chance to knock out the remaining air a player may have when they're low.
- 'if target.airticks < 40':
- 'chance.20':
- 'set.target_airticks': '0'Damage: # BottomFeeders take slightly more damage if they stray too high in the world.
- 'if target.group.BottomFeeders and target_Y >= 90': '+1'Damage: #Make Chickens explode if you don't hit them hard enough to kill them.
- 'if target.type.Chicken and damage < target_health':
- 'targeteffect.explode': '2'Damage: #Anybody who gets hit while falling a great distance takes twice as much damage.
- 'if attacker.type.human and target_falldistance >= 10': '*2'Damage: #AXTINGUISHER PYRO CRITS
- 'if attacker.wielding._axe and target_fireticks > 20': '*2'
Aliases:
Item:
axe:
- 'WOOD_AXE'
- 'STONE_AXE'
- 'IRON_AXE'
- 'GOLD_AXE'
- 'DIAMOND_AXE'Damage: #Damage bonus for players at full health.
- 'if attacker.type.player and attacker_health == 20': '+2'Spawn: #Players spawning in the darkness start with half health. D:
- 'if entity_light <= 5': '/2'Damage: #Disable damage until there are at least four players on the server.
- 'if server_playercount < 4': '0'Spawn: #Issue a challenge to find the Slime if a particularly large one spawns.
- 'if entity_size > 3': 'message.world._SlimeWarning'
Aliases:
Message:
SlimeWarning:
- "Quick! Somebody find the %{entity_type}!"
TypeName:
Slime_Other: # Element used for Slimes over size 3
- 'Enormous Slime'
- 'Rather Gigantic Slime'
- "Big Friggin' Slime" # In double quotes because otherwise the apostrophe would cause an error.Spawn: #
- 'switch.condition':
- 'if event_time < 14000': 'message.entity': '_greetDay'
- 'true': 'message.entity': '_greetNight' # Catches anything cases above don't.
Aliases:
Message:
greetDay:
- "&8Morning, everyone!"
greetNight:
- "It's awfully dark out there..."See also: Message, Explode, Entity Type, Wielding, Group, Chance