Make all radiant damage set fire to undead entities
This commit is contained in:
@@ -107,11 +107,6 @@ public class EntityRadiantTotem extends EntityScaledConstruct {
|
||||
|
||||
float damage = Spells.radiant_totem.getProperty(Spell.DAMAGE).floatValue();
|
||||
|
||||
if(target.isEntityUndead()){
|
||||
target.setFire(Spells.radiant_totem.getProperty(Spell.BURN_DURATION).intValue());
|
||||
// damage *= getProperty(UNDEAD_DAMAGE_MULTIPLIER).floatValue();
|
||||
}
|
||||
|
||||
EntityUtils.attackEntityWithoutKnockback(target, MagicDamage.causeIndirectMagicDamage(this,
|
||||
getCaster(), DamageType.RADIANT), damage);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public class RadiantTotem extends SpellConstructRanged<EntityRadiantTotem> {
|
||||
|
||||
public RadiantTotem(){
|
||||
super("radiant_totem", EntityRadiantTotem::new, false);
|
||||
this.addProperties(EFFECT_RADIUS, MAX_TARGETS, HEALTH, DAMAGE, BURN_DURATION);
|
||||
this.addProperties(EFFECT_RADIUS, MAX_TARGETS, HEALTH, DAMAGE);
|
||||
this.floor(false);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,12 @@ package electroblob.wizardry.spell;
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import electroblob.wizardry.item.SpellActions;
|
||||
import electroblob.wizardry.registry.WizardryItems;
|
||||
import electroblob.wizardry.util.*;
|
||||
import electroblob.wizardry.util.EntityUtils;
|
||||
import electroblob.wizardry.util.MagicDamage;
|
||||
import electroblob.wizardry.util.MagicDamage.DamageType;
|
||||
import electroblob.wizardry.util.ParticleBuilder;
|
||||
import electroblob.wizardry.util.ParticleBuilder.Type;
|
||||
import electroblob.wizardry.util.SpellModifiers;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -26,7 +29,7 @@ public class RayOfPurification extends SpellRay {
|
||||
|
||||
public RayOfPurification(){
|
||||
super("ray_of_purification", SpellActions.POINT, true);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, BURN_DURATION, UNDEAD_DAMAGE_MULTIPLIER);
|
||||
addProperties(DAMAGE, EFFECT_DURATION, UNDEAD_DAMAGE_MULTIPLIER);
|
||||
}
|
||||
|
||||
// The following three methods serve as a good example of how to implement continuous spell sounds (hint: it's easy)
|
||||
@@ -60,7 +63,6 @@ public class RayOfPurification extends SpellRay {
|
||||
float damage = getProperty(DAMAGE).floatValue() * modifiers.get(SpellModifiers.POTENCY);
|
||||
// Fire
|
||||
if(((EntityLivingBase)target).isEntityUndead()){
|
||||
target.setFire((int)(getProperty(BURN_DURATION).floatValue() * modifiers.get(WizardryItems.duration_upgrade)));
|
||||
damage *= getProperty(UNDEAD_DAMAGE_MULTIPLIER).floatValue();
|
||||
}
|
||||
// Damage
|
||||
|
||||
@@ -42,6 +42,11 @@ public interface IElementalDamage {
|
||||
// Charges creepers when they are hit by shock damage
|
||||
EntityUtils.chargeCreeper((EntityCreeper)event.getEntityLiving());
|
||||
}
|
||||
|
||||
if(event.getEntityLiving().isEntityUndead()
|
||||
&& ((IElementalDamage)event.getSource()).getType() == DamageType.RADIANT){
|
||||
event.getEntityLiving().setFire(8); // Same as zombies/skeletons in sunlight
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ public class MagicDamage extends EntityDamageSource implements IElementalDamage
|
||||
FIRE,
|
||||
/** Frost (ice) damage from wizardry. Snow golems, ice wraiths and ice giants are immune. */
|
||||
FROST,
|
||||
/** Shock (lightning) damage from wizardry. Lightning wraiths and storm elementals are immune. */
|
||||
/** Shock (lightning) damage from wizardry. Charges creepers. Lightning wraiths and storm elementals are immune. */
|
||||
SHOCK,
|
||||
/** Wither damage from wizardry. Withers, wither skeletons and shadow wraiths are immune. */
|
||||
WITHER,
|
||||
@@ -81,7 +81,7 @@ public class MagicDamage extends EntityDamageSource implements IElementalDamage
|
||||
FORCE,
|
||||
/** Blast damage from wizardry. Affected by the blast protection enchantment. */
|
||||
BLAST,
|
||||
/** Radiant damage from wizardry. */
|
||||
/** Radiant damage from wizardry. Sets fire to undead entities. */
|
||||
RADIANT
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
"effect_radius": 6,
|
||||
"max_targets": 1,
|
||||
"health": 1,
|
||||
"damage": 1,
|
||||
"burn_duration": 5
|
||||
"damage": 1
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,6 @@
|
||||
"range": 10,
|
||||
"damage": 2,
|
||||
"effect_duration": 60,
|
||||
"burn_duration": 5,
|
||||
"undead_damage_multiplier": 2
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user