Skip to content

Commit

Permalink
improve meta
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Apr 30, 2015
1 parent e34de8a commit cb7cd3a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Expand Up @@ -83,7 +83,7 @@ public void breakDown() {
// <context.damage> returns an Element(Decimal) of the amount of damage dealt.
// <context.final_damage> returns an Element(Decimal) of the amount of damage dealt, after armor is calculated.
// <context.entity> returns the dEntity that was damaged.
// <context.damage_TYPE> returns the damage by a given damage type. Types: BASE, HARD_HAT, BLOCKING, ARMOR,RESISTANCE, MAGIC, ABSORPTION
// <context.damage_TYPE> returns the damage dealt by a specific damage type where TYPE can be any of: BASE, HARD_HAT, BLOCKING, ARMOR, RESISTANCE, MAGIC, ABSORPTION.
//
// @Determine
// "CANCELLED" to stop the entity from being damaged.
Expand Down Expand Up @@ -145,7 +145,7 @@ public void entityDamage(EntityDamageEvent event) {
// <context.final_damage> returns an Element(Decimal) of the amount of damage dealt, after armor is calculated.
// <context.damager> returns the dEntity damaging the other entity.
// <context.projectile> returns a dEntity of the projectile shot by the damager, if any.
// <context.damage_TYPE> returns the damage by a given damage type. Types: BASE, HARD_HAT, BLOCKING, ARMOR,RESISTANCE, MAGIC, ABSORPTION
// <context.damage_TYPE> returns the damage dealt by a specific damage type where TYPE can be any of: BASE, HARD_HAT, BLOCKING, ARMOR, RESISTANCE, MAGIC, ABSORPTION.
//
// @Determine
// "CANCELLED" to stop the entity from being killed.
Expand Down Expand Up @@ -182,7 +182,7 @@ public void entityDamage(EntityDamageEvent event) {
// <context.final_damage> returns an Element(Decimal) of the amount of damage dealt, after armor is calculated.
// <context.damager> returns the dEntity damaging the other entity.
// <context.projectile> returns a dEntity of the projectile, if one caused the event.
// <context.damage_TYPE> returns the damage by a given damage type. Types: BASE, HARD_HAT, BLOCKING, ARMOR,RESISTANCE, MAGIC, ABSORPTION
// <context.damage_TYPE> returns the damage dealt by a specific damage type where TYPE can be any of: BASE, HARD_HAT, BLOCKING, ARMOR, RESISTANCE, MAGIC, ABSORPTION.
//
// @Determine
// "CANCELLED" to stop the entity from being damaged.
Expand Down Expand Up @@ -311,7 +311,7 @@ else if (damager.isPlayer()) {
// <context.damage> returns an Element(Decimal) of the amount of damage dealt.
// <context.final_damage> returns an Element(Decimal) of the amount of damage dealt, after armor is calculated.
// <context.projectile> returns a dEntity of the projectile, if one caused the event.
// <context.damage_TYPE> returns the damage by a given damage type. Types: BASE, HARD_HAT, BLOCKING, ARMOR,RESISTANCE, MAGIC, ABSORPTION
// <context.damage_TYPE> returns the damage dealt by a specific damage type where TYPE can be any of: BASE, HARD_HAT, BLOCKING, ARMOR, RESISTANCE, MAGIC, ABSORPTION.
//
// @Determine
// "CANCELLED" to stop the entity from being killed.
Expand Down
Expand Up @@ -72,8 +72,11 @@ public void execute(ScriptEntry scriptEntry) throws CommandExecutionException {

dB.report(scriptEntry, getName(), amountelement.debug() + aH.debugObj("entities", entities));
if (amountelement.asDouble() == -1)
for (dEntity entity : entities)
entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
for (dEntity entity : entities) {
if (entity.isLivingEntity()) {
entity.getLivingEntity().setHealth(entity.getLivingEntity().getMaxHealth());
}
}
else {
double amount = amountelement.asDouble();
for (dEntity entity : entities)
Expand Down

0 comments on commit cb7cd3a

Please sign in to comment.