ModDamage/ModDamage — Issue #153: can't find the error in my code...? anyone help.. please?
Author: cena6665
Created: 2012-01-10 02:03:01+00:00
State: open

Aliases:
Material:
pickaxe:
- WOOD_PICKAXE
- STONE_PICKAXE
- IRON_PICKAXE
- GOLD_PICKAXE
- DIAMOND_PICKAXE
spade:
- WOOD_SPADE
- STONE_SPADE
- IRON_SPADE
- GOLD_SPADE
- DIAMOND_SPADE
hoe:
- WOOD_HOE
- STONE_HOE
- IRON_HOE
- GOLD_HOE
- DIAMOND_HOE
axe:
- WOOD_AXE
- STONE_AXE
- IRON_AXE
- GOLD_AXE
- DIAMOND_AXE
sword:
- WOOD_SWORD
- STONE_SWORD
- IRON_SWORD
- GOLD_SWORD
- DIAMOND_SWORD
Damage:
- 'switch.attacker.type': #Begin major Offensive tree
mob: #Let's make everything nastier with this first number. 2 is decent, 4-6 is pushing past 'hard mode'.
- '2'
- 'if Attacker.Y.lessthan.48': #Get deep, take extra damage
- 'roll.2'
- 'if Attacker.Y.lessthan.24': #Get deeper, take even more damage
- 'roll.2'
- 'if event.hasrangedelement': #This handles skeletons because I'm lazy.
- '-1'
- 'roll.4'
NPC:
- 'if Attacker.Y.lessthan.42': #Just in case HeroBrine shows up.
- 'roll.2'
- 'if Attacker.Y.lessthan.24':
- 'roll.3'
Player: #Flatten all damage, recant some portion of it per Tool or AIR (bare fist).
- '-5'
- 'if attacker.wielding.AIR':
- '3'
- 'roll.4'
- 'if target.type.ZombiePigman': #Compensate blunt/slashing damage, etc
- 'div.2'
- '-2'
- 'roll.2'
- 'if target.type.Zombie and target.fireticks.lessthan.20':
- 'div.2'
- 'roll.2'
- 'if target.type.Skeleton':
- '1'
- 'roll.2'
- 'if attacker.wielding._sword':
- '7'
- 'roll.4'
- 'if target.type.ZombiePigman':
- '3'
- 'roll.2'
- 'if target.type.Zombie':
- '3'
- 'roll.2'
- 'if target.fireticks.greaterthan.1':
- '3'
- 'if target.type.Skeleton':
- 'div.2'
- '-6'
- 'roll.2'
- 'if attacker.wielding._axe': #Let's make these useful since mcMMO has some neat axe effects and a melee skill that never gets used.
- '5'
- 'roll.4'
- 'if target.type.ZombiePigman': #I quantify axes as 'blunt damage', just for balance purposes so they can be crazy player slayers but not so good against zombies.
- 'div.2'
- '-3'
- 'roll.2'
- 'if target.type.Zombie and target.fireticks.lessthan.20':
- 'div.2'
- '-2'
- 'roll.2'
- 'if target.type.Skeleton':
- '1'
- 'roll.2'
- 'if attacker.wielding.BOW': #A little randomization for player arrows.
- '1'
- 'roll.4'
- 'if chance.5':
- 'attackereffect.addhealth': '1'
- 'if target.type.ZombiePigman': #and some reduction for 'piercing' types, but more just a down-randomizer.
- '-2'
- 'roll.2'
- 'if target.type.Zombie and target.fireticks.lessthan.20':
- '-2'
- 'roll.2'
- 'if target.type.Skeleton': #Except skeletons, who laugh at your arrows going right through them.
- 'div.2'
- '-2'
- 'roll.2'
- 'if Target.Y.lessthan.48': #Players do less damage when 'deep' as well
- '-1'
- 'if Target.Y.lessthan.24': #Players do less damage when 'deep' as well
- '-2'
- 'if attacker.wielding._pickaxe': #Covering the rest of the tools, picks do 'piercing' like arrows, so get an extra hitch against skellies.
- '3'
- 'roll.2'
- 'if target.type.Skeleton':
- '-4'
- 'roll.2'
- 'if attacker.wielding._spade': #Shovels suck. Use it to dig your own grave! Except against zombies
- '2'
- 'if target.type.Zombie': #Easter eggs
- '4'
- 'roll.4'
#- 'if chance.5':
# - "message.attacker. Ed, this is serious!"
#- 'if chance.5':
# - "message.attacker. Don't forget to kill Philip!"
- 'if attacker.wielding._hoe': #This makes more sense with my server's texture pack, hoes look like scythes!
- 'roll.4'
- 'if target.type.Skeleton':
- '-2'
- 'if target.type.ZombiePigman':
- 'roll.6'
- 'if target.type.Zombie':
- 'roll.8'
- 'if attacker.wielding.DIAMOND_AXE': #High Crit!
- 'if chance.40':
- 'roll.12'
- "message.attacker.Critical Hit!"
- "message.target.You've been critically hit!"
- 'if attacker.wielding.DIAMOND_SWORD': #Crit!
- 'if chance.30':
- 'roll.8'
- "message.attacker.Critical Hit!"
- "message.target.You've been critically hit!"
- 'if attacker.wielding.IRON_AXE': #Less Crit!
- 'if chance.20':
- 'roll.6'
- "message.attacker.Critical Hit!"
- "message.target.You've been critically hit!"
- 'if attacker.wielding.IRON_SWORD': #Bitty Crit!
- 'if chance.15':
- 'roll.4'
- "message.attacker.Critical Hit!"
- "message.target.You've been critically hit!"
- 'if attacker.wielding.GOLD_SWORD': #FIRE! Gold stuff is magical btw.
- 'if chance.80 and target.fireticks.lessthan.20':
- 'targeteffect.addfireticks':
- '60'
- 'if chance.100 and target.fireticks.greaterthanequals.20':
- 'targeteffect.addfireticks':
- '20'
- 'if attacker.wielding.GOLD_AXE': #Magic or just insane, idk.
- 'if chance.75':
- 'targeteffect.explode': '2'
- 'if attacker.falldistance.greaterthanequals.1 and !event.hasrangedelement': #High ground has advantage in melee? Why not.
- '3'
- "message.attacker.Leap Attack!"
- "message.target.You've been sundered by a Leap Attack!"
- 'if attacker.falldistance.greaterthanequals.3 and event.hasrangedelement': #High ground has advantage with ranged? Why not.
- '4'
- "message.attacker.Snipped!"
- "message.target.You've been Snipped!"
- 'if attacker.wielding.DIAMOND_HOE': #Now we just need cloaks and skull masks...
- 'if chance.5':
- '10'
- 'roll.40'
- "message.attacker.Reaped!"
- "message.target.You've been reaped!"
- 'if attacker.wielding.GOLD_HOE': #Higher rate because of stupid low durability, but does slightly less insane damage.
- 'if chance.7':
- 'roll.50'
- "message.attacker.Reaped!"
- "message.target.You've been reaped!"
- 'if attacker.wielding.IRON_HOE': #Just to keep the trend
- 'if chance.2':
- 'roll.18'
- "message.attacker.Reaped!"
- "message.target.You've been reaped!"
- 'if attacker.wielding.WOOD_HOE': #Keep this our little secret!
- 'if chance.5':
- 'if chance.50':
- 'targeteffect.explode': '2'
- 'roll.90'
- "message.attacker.SUPER REAPED!"
- "message.target.You've been SUPER REAPED!"
- 'if attacker.wearing.LEATHER_CHESTPLATE': #Deal less damage if wearing armor!
- '-1'
#- 'if attacker.wearing.LEATHER_HELMET': Just gonna negate these trivial pieces
- 'if attacker.wearing.LEATHER_LEGGINGS':
- '-1'
#- 'if attacker.wearing.LEATHER_BOOTS':
- 'if attacker.wearingonly.LEATHER_HELMET*LEATHER_CHESTPLATE*LEATHER_LEGGINGS*LEATHER_BOOTS': #Leather switches to a teeny damage bonus if wearing full set, larger bonus if shooting a bow or even if throwing eggs or snowballs!
- '2'
- 'if event.hasrangedelement':
- '3'
- 'roll.2'
- 'if chance.100
- 'mult.2'
- 'if attacker.wearing.IRON_CHESTPLATE': #Iron really slows you down if you want that damage reduction...
- '-2'
- 'if attacker.wearing.IRON_HELMET':
- '-1'
- 'roll.1'
- 'if attacker.wearing.IRON_LEGGINGS':
- '-2'
- 'roll.1'
- 'if attacker.wearing.IRON_BOOTS':
- '-1'
- 'roll.1'
- 'if attacker.wearingonly.IRON_HELMET*IRON_CHESTPLATE*IRON_LEGGINGS*IRON_BOOTS': #Wearing whole set negates a little penalty
- '1'
- 'if attacker.wearing.GOLD_CHESTPLATE': #Gold breaks the mould! Random damage bonus!
- 'roll.3'
- '-1'
- 'if attacker.wearing.GOLD_HELMET':
- 'roll.1'
- '-1'
- 'if attacker.wearing.GOLD_LEGGINGS':
- 'roll.2'
- '-1'
- 'if attacker.wearing.GOLD_BOOTS':
- 'roll.1'
- '-1'
- 'if attacker.wearingonly.GOLD_HELMET*GOLD_CHESTPLATE*GOLD_LEGGINGS*GOLD_BOOTS': #and a little guaranteed bonus with full set, with a chance of fire damage with any weapon!
- '1'
- 'if chance.50':
- 'targeteffect.addfireticks': '20'
- 'if attacker.wearing.DIAMOND_CHESTPLATE': #Diamond's pieces will randomly negate the penalty
- '-4'
- 'if chance.75':
- '1'
- 'if attacker.wearing.DIAMOND_HELMET':
- '-2'
- 'if chance.75':
- '1'
- 'if attacker.wearing.DIAMOND_LEGGINGS':
- '-3'
- 'if chance.70':
- '2'
- 'if attacker.wearing.DIAMOND_BOOTS':
- '-2'
- 'if chance.70':
- '1'
- 'if attacker.wearingonly.DIAMOND_HELMET*DIAMOND_CHESTPLATE*DIAMOND_LEGGINGS*DIAMOND_BOOTS': #Full set gives a little random life leech.
- 'attackereffect.addhealth': 'roll.3'
- '-2'
animal: #Same 'deep' thing, but on wolves if they get down there...
- 'if Attacker.Y.lessthan.48':
- 'roll.2'
- 'if Attacker.Y.lessthan.24':
- 'roll.2'
lightning: #Boosh!
- '-1'
- 'roll.6'
lava: #I'd rather the lava kill me than the fire ticks afterward
- '2'
- 'if target.wearing.DIAMOND_BOOTS': #Direct exposure reduction. Could probably wade through lava for a short time with gold boots and iron damage reduction... which is AWESOME!
- '-2'
- 'if target.wearing.GOLD_BOOTS':
- '-2'
- 'if target.wearing.IRON_BOOTS':
- '-1'
- 'if target.wearing.LEATHER_BOOTS':
- '-1'
explosion: #Helmets reduce this. Gold is extra good of course.
- 'if target.wearing.DIAMOND_HELMET':
- '-2'
- 'if target.wearing.GOLD_HELMET':
- 'div.2'
- '*3'
- 'if target.wearing.IRON_HELMET':
- '-1'
- 'if target.wearing.LEATHER_HELMET':
- '-1'
fall: #Boots reduce fall damage. Not by too much though...
- 'if target.wearing.DIAMOND_BOOTS':
- '-2'
- 'if target.wearing.GOLD_BOOTS':
- '-2'
- 'if target.wearing.IRON_BOOTS':
- '-1'
- 'if target.wearing.LEATHER_BOOTS':
- '-3'
void: #Get on with it!
- 'set.20'
burn: #Tick damage reduction. Gold practically negates.
- 'if target.wearing.DIAMOND_LEGGINGS':
- '-2'
- 'if target.wearing.GOLD_LEGGINGS':
- '-1'
- 'if target.wearing.IRON_LEGGINGS':
- '-1'
- 'if target.wearing.LEATHER_LEGGINGS':
- '-2'
- '4'
fire: #Direct exposure reduction.
- 'if target.wearing.DIAMOND_BOOTS':
- '-4'
- 'if target.wearing.GOLD_BOOTS':
- '-3'
- 'if target.wearing.IRON_BOOTS':
- '-2'
- 'if target.wearing.LEATHER_BOOTS':
- '-1'
- '2'
drowning: #Changes drowning dynamic. Won't get stuck underwater because of constant damage taken, but still drown just as fast.
- '3'
- 'targeteffect.addairticks': '40'
cactus: #This is more to reduce damage to mobs. Player's armor handles the rest.
- '-2'
- 'roll.3'
ZombiePigman:
- '2'
- 'roll.4'
- 'if event.environment.PvP': #Make em extra nasty!
- '4'
- 'targeteffect.addfireticks': '20'
Creeper_Normal: #Damage reduced when wearing a helmet, gold is extra good.
- 'if target.wearing.DIAMOND_HELMET':
- '-2'
- 'if target.wearing.GOLD_HELMET':
- 'div.2'
- '*3'
- 'if target.wearing.IRON_HELMET':
- '-1'
- 'if target.wearing.LEATHER_HELMET':
- '-1'
Creeper_Charged: #Creeper cluster bombs?
- 'targeteffect.explode': '4'
- 'if target.wearing.DIAMOND_HELMET':
- '-2'
- 'if target.wearing.GOLD_HELMET':
- 'div.2'
- '*3'
- 'if target.wearing.IRON_HELMET':
- '-1'
- 'if target.wearing.LEATHER_HELMET':
- '-1'
Spider: #Spiders are less hax but will always do a half heart (You'll see later in this config).
- '-2' #They definitely still chew up your armor fast though.
- 'roll.8'
- 'if chance.2':
- 'attackereffect.addhealth': '2'
Giant:
- 'roll.7'
Zombie: #Zombies heal by biting things!
- '2'
- 'roll.2'
- 'attackereffect.addhealth': '5'
Slime:
- 'roll.8'
- 'if event.value.greaterthan.6':
- 'attackereffect.setsize': '10'
- '-2'
#Skeleton: Handled earlier cause I'm lazy.
Ghast:
- '3'
Blaze:
- '2'
- 'roll.8'
- 'if chance.10':
- '4'
Wolf_Wild: #Similar to spiders, slightly less damage because they hit fast but chew up your armor.
- '-4'
- 'roll.4'
- 'attackereffect.addhealth': '1'
- 'if world.time.lessthan.14000': #Normalized damage at night
- '2'
- 'if event.environment.PvP': #Wolves spawned in the nether by AngryWolves in place of pigzombies are flaming hellhounds.
- 'attackereffect.addhealth': '2''
- 'targeteffect.setfireticks': #So let's make them really firey.
- '40'
Wolf_Tame: #A little randomization but no bonus because wolves are a little OP anyway.
- '-2'
- 'roll.4'
- 'if chance.3':
- 'attackereffect.addhealth': '2'
- 'if target.type.Spider': #Punching spiders gets you bitten. Makes up for their occasionally floored hits.
'if attacker.wielding.AIR':
- 'attackereffect.Hurt': '2'
- 'if target.type.Player': #Player defensive tree
- 'if event.value.lessthanequals.0': #Always take at least half a heart to apply armor damage.
- 'set.1'
- 'if attacker.type.player': #Unless it's a player punching us with an item maybe
- 'set.0'
- 'if attacker.wielding.AIR': #So we'll check for fists and tools too! Tried an 'or' statement but didn't seem to work...
- 'set.1'
- 'if attacker.wielding._sword':
- 'set.1'
- 'if attacker.wielding._axe':
- 'set.1'
- 'if attacker.wielding.BOW':
- 'set.1'
- 'if attacker.wielding._pickaxe':
- 'set.1'
- 'if attacker.wielding._spade':
- 'set.1'
- 'if attacker.wielding._hoe':
- 'set.1'
- 'if target.wearing.LEATHER_CHESTPLATE': #Leather makes you dodge, tweaked to ignore some environmentals
- '-1' #All chestplates and leggings give a little bit of 100% damage reduction
- 'if chance.7 and !attacker.type.fire and !attacker.type.lava and !attacker.type.fall and !attacker.type.burn':
- 'set.0'
- "message.target.Dodged!"
- "message.attacker.Your attack was dodged!"
- 'if target.wearing.LEATHER_HELMET':
- 'if chance.4 and !attacker.type.fire and !attacker.type.lava and !attacker.type.fall and !attacker.type.burn':
- 'set.0'
- "message.target.Dodged!"
- "message.attacker.Your attack was dodged!"
- 'if target.wearing.LEATHER_LEGGINGS':
- '-1'
- 'if chance.5 and !attacker.type.fire and !attacker.type.lava and !attacker.type.fall and !attacker.type.burn':
- 'set.0'
- "message.target.Dodged!"
- "message.attacker.Your attack was dodged!"
- 'if target.wearing.LEATHER_BOOTS':
- 'if chance.4 and !attacker.type.fire and !attacker.type.lava and !attacker.type.fall and !attacker.type.burn':
- 'set.0'
- "message.target.Dodged!"
- "message.attacker.Your attack was dodged!"
- 'if target.wearingonly.LEATHER_HELMET*LEATHER_CHESTPLATE*LEATHER_LEGGINGS*LEATHER_BOOTS': #Set bonus totals out to ~30% dodge rate
- 'if chance.30 and !attacker.type.fire and !attacker.type.lava and !attacker.type.fall and !attacker.type.burn':
- 'set.0'
- "message.target.Dodged!"
- "message.attacker.Your attack was dodged!"
- 'if target.wearing.IRON_CHESTPLATE': #Iron gives straight damage reduction chance
- '-1'
- 'if chance.50':
- '-3'
- 'if target.wearing.IRON_HELMET':
- 'if chance.35':
- '-1'
- 'if target.wearing.IRON_LEGGINGS':
- '-1'
- 'if chance.40':
- '-2'
- 'if target.wearing.IRON_BOOTS':
- 'if chance.35':
- '-1'
- 'if target.wearingonly.IRON_HELMET*IRON_CHESTPLATE*IRON_LEGGINGS*IRON_BOOTS': #Set bonus is ~60% total chance to reduce an average of ~4 hearts of damage
- 'if chance.50':
- '-3'
- 'if target.wearing.GOLD_CHESTPLATE': #Gold set is like gold weapons, sets attackers ON FIRE!
- '-1'
- 'if chance.75':
- 'attackereffect.addfireticks':
- '30'
- 'if target.wearing.GOLD_HELMET':
- 'if chance.75':
- 'attackereffect.addfireticks':
- '10'
- 'if target.wearing.GOLD_LEGGINGS':
- '-1'
- 'if chance.75':
- 'attackereffect.addfireticks':
- '20'
- 'if target.wearing.GOLD_BOOTS':
- 'if chance.75':
- 'attackereffect.addfireticks':
- '10'
- 'if target.wearingonly.GOLD_HELMET*GOLD_CHESTPLATE*GOLD_LEGGINGS*GOLD_BOOTS': #Even more fire duration, with a chance of a little extra 'kick'!
- 'attackereffect.addfireticks':
- '50'
- 'if chance.50':
- 'attackereffect.explode': '1'
- 'if target.wearing.DIAMOND_CHESTPLATE': #Diamond reflects damage back at the attacker.
- '-2'
- 'if chance.75':
- 'attackereffect.Hurt': '2'
- 'if target.wearing.DIAMOND_HELMET':
- 'if chance.75':
- 'attackereffect.Hurt': '1'
- 'if target.wearing.DIAMOND_LEGGINGS':
- '-1'
- 'if chance.75':
- 'attackereffect.Hurt': '1'
- 'if target.wearing.DIAMOND_BOOTS':
- 'if chance.75':
- 'attackereffect.Hurt': '1'
- 'if target.wearingonly.DIAMOND_HELMET*DIAMOND_CHESTPLATE*DIAMOND_LEGGINGS*DIAMOND_BOOTS': #Guaranteed damage to attacker with full set, and should average 3.5 hearts reflected.
- 'attackereffect.Hurt': '2'
- 'if target.light.lessthanequals.5': #Players take extra damage in the darkness!
- 'roll.5'
# mob:
# armor:
# ranged:
# humans:
# melee:
# animal:
# Creeper:
# Spider:
# Giant:
# Slime:
# Ghast:
# snowball:
# bow:
# egg:
# fireball:
# other:
# pickaxe:
# AIR:
# spade:
# hoe:
# axe:
# sword:
# animal:
# Chicken:
# Sheep:
# Pig:
# Squid:
# Wolf:
# Cow:
Death:
Food:
debugging: normal
Spawn:
- 'switch.target.type': #A little extra health for animals too because of lethality running rampant. Underground spawns get bonus health.
Creeper:
- 'if !target.isexposedtosky and target.Y.lessthanequals.64':
- 'roll.5'
Chicken:
- '2'
Sheep:
- '6'
# Giant:
Slime:
- '4'
ZombiePigman:
- 'range.44.50'
Spider:
- 'range.14.16'
- 'if !target.isexposedtosky and target.Y.lessthanequals.64':
- 'roll.8'
Pig:
'3'
# Squid:
Wolf:
- 'range.16.18'
- 'if !target.isexposedtosky and target.Y.lessthanequals.64': #Never a natural spawn underground, only AngryWolves spawns which are hostile, so let's make this consistent!
- '5'
- 'roll.2'
- 'if target.isexposedtosky and world.time.lessthan.14000': #Outside spawns at night, particulary on the 'full moons' that AngryWolves does.
- '3' #No point on other mobs, because most mobs spawn at night anyway.
Zombie:
- 'range.36.40'
- 'if !target.isexposedtosky and target.Y.lessthanequals.64':
- 'roll.12'
Cow: #Bovines are tough mofos!
- '8'
Ghast: #Because I hate them SO MUCH... and arrows kinda suck now.
- '2'
Skeleton:
- 'range.12.18'
- 'if !target.isexposedtosky and target.Y.lessthanequals.64':
- 'roll.6'