use of eidolons.ability.effects.common.LightEmittingEffect in project Eidolons by IDemiurge.
the class IlluminationRule method getLightEmissionEffect.
public LightEmittingEffect getLightEmissionEffect(DC_Obj source) {
LightEmittingEffect effect = effectCache.get(source);
if (effect == null) {
int value = getLightEmission(source);
if (value <= 0) {
return null;
}
Boolean circular = true;
if (source instanceof Unit)
circular = false;
else if (source.checkBool(GenericEnums.STD_BOOLS.SPECTRUM_LIGHT)) {
circular = false;
} else if (EntityCheckMaster.isOverlaying(source)) {
BattleFieldObject dc_Obj = (BattleFieldObject) source;
if (dc_Obj.getDirection() != null) {
circular = false;
}
}
effect = new LightEmittingEffect(("" + value), circular);
effect.setRef(new Ref(source));
effectCache.put(source, effect);
} else
effect.getEffects().setFormula(new Formula("" + getLightEmission(source)));
return effect;
}
use of eidolons.ability.effects.common.LightEmittingEffect in project Eidolons by IDemiurge.
the class SpellIlluminationRule method spellResolves.
public void spellResolves(DC_ActiveObj spell) {
Unit caster = spell.getOwnerObj();
Boolean circular = true;
// distance reductionBoolean circular = true;
if (spell.checkBool(GenericEnums.STD_BOOLS.SPECTRUM_LIGHT)) {
circular = false;
}
int value = spell.getIntParam(PARAMS.SPELL_DIFFICULTY);
LightEmittingEffect effect = new LightEmittingEffect(("" + value), circular);
effect.apply(new Ref(caster));
caster.getGame().getManager().reset();
WaitMaster.WAIT(delay);
caster.getGame().getVisionMaster().refresh();
caster.getGame().getBattleField().getGrid().refresh();
// reduce for distance
}
Aggregations