Cleanup and minor code tweaks
This commit is contained in:
@@ -58,8 +58,8 @@ public class MindControl extends Spell {
|
|||||||
if(!world.isRemote){
|
if(!world.isRemote){
|
||||||
if(!canControl(target)){
|
if(!canControl(target)){
|
||||||
// Adds a message saying that the player/boss entity/wizard resisted mind control
|
// Adds a message saying that the player/boss entity/wizard resisted mind control
|
||||||
if(!world.isRemote) caster.sendMessage(new TextComponentTranslation("spell.resist",
|
caster.sendMessage(new TextComponentTranslation("spell.resist", target.getName(),
|
||||||
target.getName(), this.getNameForTranslationFormatted()));
|
this.getNameForTranslationFormatted()));
|
||||||
|
|
||||||
}else if(target instanceof EntityLiving){
|
}else if(target instanceof EntityLiving){
|
||||||
|
|
||||||
|
|||||||
@@ -57,11 +57,11 @@ public class ShadowWard extends Spell {
|
|||||||
&& !(event.getSource() instanceof IElementalDamage && ((IElementalDamage)event.getSource()).isRetaliatory())){
|
&& !(event.getSource() instanceof IElementalDamage && ((IElementalDamage)event.getSource()).isRetaliatory())){
|
||||||
|
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
// Now we can preserve the original daage source (sort of) as long as we make it retaliatory.
|
// Now we can preserve the original damage source (sort of) as long as we make it retaliatory.
|
||||||
event.getEntityLiving().attackEntityFrom(
|
event.getEntityLiving().attackEntityFrom(
|
||||||
MagicDamage.causeDirectMagicDamage(event.getSource().getTrueSource(), DamageType.MAGIC, true), event.getAmount() / 2);
|
MagicDamage.causeDirectMagicDamage(event.getSource().getTrueSource(), DamageType.MAGIC, true), event.getAmount() * 0.5f);
|
||||||
((EntityLivingBase)event.getSource().getTrueSource())
|
((EntityLivingBase)event.getSource().getTrueSource()).attackEntityFrom(
|
||||||
.attackEntityFrom(MagicDamage.causeDirectMagicDamage(event.getEntityLiving(), DamageType.MAGIC, true), event.getAmount() / 2);
|
MagicDamage.causeDirectMagicDamage(event.getEntityLiving(), DamageType.MAGIC, true), event.getAmount() * 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,10 +81,9 @@ public class MagicDamage extends EntityDamageSource implements IElementalDamage
|
|||||||
public enum DamageType {
|
public enum DamageType {
|
||||||
/** Generic magic damage from the wizardry mod. Like vanilla magic damage, except it doesn't bypass armour. */
|
/** Generic magic damage from the wizardry mod. Like vanilla magic damage, except it doesn't bypass armour. */
|
||||||
MAGIC,
|
MAGIC,
|
||||||
/**
|
/** Fire damage from the wizardry mod. Counts as fire damage in the vanilla system, so is blocked by any mobs
|
||||||
* Fire damage from the wizardry mod. Counts as fire damage in the vanilla system, so is blocked by any mobs
|
* that are immune to fire and entities with the fire resistance effect, and is affected by the fire protection
|
||||||
* that are immune to fire and entities with the fire resistance effect.
|
* enchantment. */
|
||||||
*/
|
|
||||||
FIRE,
|
FIRE,
|
||||||
/** Frost (ice) damage from the wizardry mod. Snow golems, ice wraiths and ice giants are immune. */
|
/** Frost (ice) damage from the wizardry mod. Snow golems, ice wraiths and ice giants are immune. */
|
||||||
FROST,
|
FROST,
|
||||||
@@ -94,13 +93,11 @@ public class MagicDamage extends EntityDamageSource implements IElementalDamage
|
|||||||
WITHER,
|
WITHER,
|
||||||
/** Poison damage from the wizardry mod. Spiders, cave spiders and undead mobs are immune. */
|
/** Poison damage from the wizardry mod. Spiders, cave spiders and undead mobs are immune. */
|
||||||
POISON,
|
POISON,
|
||||||
/**
|
/** Force damage from the wizardry mod. */ // Insubstantial creatures (ghast, shadow wraith, etc.) are immune?
|
||||||
* [NYI] Force damage from the wizardry mod. Insubstantial creatures (ghast, shadow wraith, etc.) are immune.
|
|
||||||
*/
|
|
||||||
FORCE,
|
FORCE,
|
||||||
/** Blast damage from the wizardry mod. Affected by the blast protection enchantment. */
|
/** Blast damage from the wizardry mod. Affected by the blast protection enchantment. */
|
||||||
BLAST,
|
BLAST,
|
||||||
/** [NYI] Radiant damage from the wizardry mod. */
|
/** Radiant damage from the wizardry mod. */
|
||||||
RADIANT;
|
RADIANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user