Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on damage:
- if victim's name contains "Level":
- set {_lore} to uncolored line 3 of lore of attacker's weapon
- replace all "♦ Atk Dmg: " in {_lore} with ""
- set {_dmg} to "%{_lore}%" parsed as integer
- set {_n::*} to uncolored name of victim split at "[Level "
- set {_level} to {_n::2}
- replace all "]" in {_level} with ""
- set {_level} to "%{_level}%" parsed as integer
- set {_name.1::*} to uncolored victim's name split at "♥"
- set {_name} to MobType({_name.1::*})
- set {_armor} to {dungeon::mob::%{_name}%::defense}
- set {_ability.dmg} to 1
- set {_armor.effect} to EffectCalculation({_armor}, 10)
- if {dungeon::%uuid of attacker%::active} is true:
- if {dungeon::%uuid of attacker%::ability} is "Double Slash":
- set {_ability.dmg} to 2
- send action bar "&aDouble Slash - x2 dmg" to attacker
- delete {dungeon::%uuid of attacker%::active}
- spawn 20 of "flame":0.01 offset by 1, 1, 1 at victim
- else if {dungeon::%uuid of attacker%::ability} is "Execute":
- if victim's maximum health * 0.25 > victim's health:
- set {_hp} to 0
- send action bar "&aEnemy Executed" to attacker
- set {dungeon::%uuid of attacker%::active} to false
- spawn 20 of "flame":0.01 offset by 1, 1, 1 at victim
- else:
- send action bar "&cExecute failed - enemy with high health" to attacker
- set {dungeon::%uuid of attacker%::active} to false
- else if {dungeon::%uuid of attacker%::ability} is "Healthy Body":
- set {_ability.dmg} to 1 + (attacker's health / 0.5) * 0.03
- send action bar "&aHealthy Body - x%{_ability.dmg}% dmg" to attacker
- set {dungeon::%uuid of attacker%::active} to false
- spawn 20 of "flame":0.01 offset by 1, 1, 1 at victim
- if {dungeon::%uuid of attacker%::stats::strength} > 9:
- if attacker's maximum health / attacker's health > 2:
- set {_ability.dmg} to {_ability.dmg} * attacker's maximum health / attacker's health / 2
- if projectile is an arrow:
- set {_total.damage} to ({_dmg} - (({_armor.effect} / 100) * {_dmg})) * {arrow.speed::%attacker%} * 1.36 * {_ability.dmg}
- else:
- set {_damage.taken} to ({_dmg} - (({_armor.effect} / 100) * {_dmg})) * {_ability.dmg}
- if {_hp} isn't set:
- set {_hp} to victim's health - {_damage.taken}
- if {_hp} > 0:
- set damage to 0
- set victim's health to {_hp}
- set name of victim to "%{dungeon::mob::%{_name}%::name}% &c%{_hp}%♥/%victim's max health%♥ &6[Level %{_level}%]"
- else:
- set {_hp} to 0
- set name of victim to "%{dungeon::mob::%{_name}%::name}% &c%{_hp}%♥/%victim's max health%♥ &6[Level %{_level}%]"
- kill victim
- add 1 to {dungeon::%uuid of attacker%::kills.level}
- set {_value} to {_level} * {dungeon::mob::%{_name}%::value}
- send action bar "&6+%{_value}% Gold" to attacker
- add {_value} to {dungeon::%uuid of attacker%::gold}
- add {_value} to {dungeon::%uuid of attacker%::xp}
- xpUpdate(attacker)
- if {dungeon::%uuid of attacker%::kills.level} = {dungeon::%uuid of attacker%::kills.need}:
- if {dungeon::%uuid of attacker%::stats::health} > 14:
- set attacker's absorption hearts to 1
- send attacker title "&a&lLevel Cleared"
- spawn 100 of "flame":0.1 offset by 1, 1, 1 at {dungeon::%uuid of attacker%::end}
- set block at {dungeon::%uuid of attacker%::end} to chest
- set {_name.item} to LootDraw(attacker)
- set {_item} to ItemSet({_name.item})
- if "%{_item}%" contains "arrow":
- set {_amount} to 5
- else:
- set {_amount} to 1
- add {_amount} of {_item} to inventory of block at {dungeon::%uuid of attacker%::end}
- if {dungeon::%uuid of attacker%::stats::health} > 9:
- add 1 to attacker's health
- else if victim is player:
- attacker's name contains "Level"
- set {_name.1::*} to uncolored attacker's name split at "♥"
- set {_name} to MobType({_name.1::*})
- set {_n::*} to uncolored name of attacker split at "[Level "
- set {_level} to {_n::2}
- replace all "]" in {_level} with ""
- set {_level} to "%{_level}%" parsed as integer
- set {_level.dmg} to (({_level} - 1) * 0.5) + 1
- set {_dmg} to {dungeon::mob::%{_name}%::attack} * {_level.dmg}
- set {_slot} to 36
- loop 4 times:
- if slot {_slot} of victim's inventory is set:
- set {_lore} to uncolored line 3 of lore of slot {_slot} of victim's inventory
- replace all "♦ Defense: " in {_lore} with ""
- add ("%{_lore}%" parsed as number) to {_defense.armor}
- add 1 to {_slot}
- set {_total.armor} to {_defense.armor}
- set {_total.damage} to {_dmg}
- set {_armor.effect} to EffectCalculation({_total.armor}, 5)
- set {_ability.def} to 1
- if {dungeon::%uuid of victim%::active} is true:
- if {dungeon::%uuid of victim%::ability} is "Fortify":
- if difference between {dungeon::%uuid of victim%::ability.used} and now < 2 seconds:
- set {_ability.def} to 2
- else:
- set {dungeon::%uuid of victim%::active} to false
- if {_damage.taken} isn't set:
- set {_damage.taken} to ({_total.damage} - (({_armor.effect} * {_ability.def} / 100) * {_total.damage}))
- set {_hp} to victim's health - {_damage.taken}
- if {_hp} >= 0:
- set damage to 0
- set victim's health to {_hp}
- else:
- cancel event
- heal victim
- clear victim's inventory
- send victim title "&c&lGame Over"
- make victim execute command "/spawn"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement