Skip to content

Commit

Permalink
revert testing changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iron431 committed Feb 27, 2024
1 parent 0c61688 commit a4eeeaf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static AbstractSpell getSpell(ResourceLocation resourceLocation) {
public static final RegistryObject<AbstractSpell> GUIDING_BOLT_SPELL = registerSpell(new GuidingBoltSpell());
public static final RegistryObject<AbstractSpell> HEALING_CIRCLE_SPELL = registerSpell(new HealingCircleSpell());
public static final RegistryObject<AbstractSpell> HEAL_SPELL = registerSpell(new HealSpell());
public static final RegistryObject<AbstractSpell> SUNBEAM_SPELL = registerSpell(new SunbeamSpell());
//public static final RegistryObject<AbstractSpell> SUNBEAM_SPELL = registerSpell(new SunbeamSpell());
public static final RegistryObject<AbstractSpell> WISP_SPELL = registerSpell(new WispSpell());
public static final RegistryObject<AbstractSpell> DIVINE_SMITE_SPELL = registerSpell(new DivineSmiteSpell());
public static final RegistryObject<AbstractSpell> HASTE_SPELL = registerSpell(new HasteSpell());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ public Sunbeam(Level level) {
@Override
public void tick() {

if (tickCount == this.getEffectDuration()) {
if (!level.isClientSide) {
MagicManager.spawnParticles(level, ParticleTypes.LAVA, getX(), getY(), getZ(), 25, getRadius() * .7f, .2f, getRadius() * .7f, 1, true);
MagicManager.spawnParticles(level, ParticleHelper.EMBERS, getX(), getY(), getZ(), 60, getRadius() * .7f, .2f, getRadius() * .7f, 1, true);
} else {
checkHits();
discard();
}
if (tickCount == 4) {
checkHits();
if (!level.isClientSide)
MagicManager.spawnParticles(level, ParticleTypes.FIREWORK, getX(), getY(), getZ(), 9, getRadius() * .7f, .2f, getRadius() * .7f, 1, true);
}

if (this.tickCount > 6) {
discard();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public class TeleportSpell extends AbstractSpell {
.build();

public TeleportSpell() {
this.baseSpellPower = 0;
this.spellPowerPerLevel = 5;
this.baseSpellPower = 10;
this.spellPowerPerLevel = 10;
this.baseManaCost = 20;
this.manaCostPerLevel = 2;
this.castTime = 0;
Expand Down Expand Up @@ -145,7 +145,7 @@ public static void particleCloud(Level level, Vec3 pos) {
}

private float getDistance(int spellLevel, LivingEntity sourceEntity) {
return 10 + getSpellPower(spellLevel, sourceEntity);
return getSpellPower(spellLevel, sourceEntity);
}

public static class TeleportData implements ICastData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import io.redspace.ironsspellbooks.api.spells.*;
import io.redspace.ironsspellbooks.api.util.Utils;
import io.redspace.ironsspellbooks.capabilities.magic.CastTargetingData;
import io.redspace.ironsspellbooks.capabilities.magic.MagicManager;
import io.redspace.ironsspellbooks.entity.spells.sunbeam.Sunbeam;
import io.redspace.ironsspellbooks.particle.ShockwaveParticleOptions;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -86,12 +84,12 @@ public void onCast(Level level, int spellLevel, LivingEntity entity, CastSource
spawn = Utils.moveToRelativeGroundLevel(level, raycast.getLocation().subtract(entity.getForward().normalize()).add(0, 2, 0), 5);
}
}
MagicManager.spawnParticles(level, new ShockwaveParticleOptions(SchoolRegistry.FIRE.get().getTargetingColor(), -6, true), spawn.x, spawn.y, spawn.z, 1, 0, 0, 0, 0, true);

Sunbeam sunbeam = new Sunbeam(level);
sunbeam.setOwner(entity);
sunbeam.moveTo(spawn);
sunbeam.setDamage(getDamage(spellLevel, entity));
sunbeam.setEffectDuration(15);
sunbeam.setEffectDuration(getDuration(spellLevel, entity));
level.addFreshEntity(sunbeam);

super.onCast(level, spellLevel, entity, castSource, playerMagicData);
Expand Down

0 comments on commit a4eeeaf

Please sign in to comment.