Reactive effect flag
This commit is contained in:
@@ -161,10 +161,12 @@ public class StatusEffects implements ContentList{
|
|||||||
|
|
||||||
shocked = new StatusEffect("shocked"){{
|
shocked = new StatusEffect("shocked"){{
|
||||||
color = Pal.lancerLaser;
|
color = Pal.lancerLaser;
|
||||||
|
reactive = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
blasted = new StatusEffect("blasted"){{
|
blasted = new StatusEffect("blasted"){{
|
||||||
color = Color.valueOf("ff795e");
|
color = Color.valueOf("ff795e");
|
||||||
|
reactive = true;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
corroded = new StatusEffect("corroded"){{
|
corroded = new StatusEffect("corroded"){{
|
||||||
|
|||||||
@@ -55,10 +55,12 @@ abstract class StatusComp implements Posc, Flyingc{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//otherwise, no opposites found, add direct effect
|
if(!effect.reactive){
|
||||||
StatusEntry entry = Pools.obtain(StatusEntry.class, StatusEntry::new);
|
//otherwise, no opposites found, add direct effect
|
||||||
entry.set(effect, duration);
|
StatusEntry entry = Pools.obtain(StatusEntry.class, StatusEntry::new);
|
||||||
statuses.add(entry);
|
entry.set(effect, duration);
|
||||||
|
statuses.add(entry);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void clearStatuses(){
|
void clearStatuses(){
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ public class StatusEffect extends MappableContent{
|
|||||||
public float effectChance = 0.15f;
|
public float effectChance = 0.15f;
|
||||||
/** If true, the effect never disappears. */
|
/** If true, the effect never disappears. */
|
||||||
public boolean permanent;
|
public boolean permanent;
|
||||||
|
/** If true, this effect will only react with other effects and cannot be applied. */
|
||||||
|
public boolean reactive;
|
||||||
/** Tint color of effect. */
|
/** Tint color of effect. */
|
||||||
public Color color = Color.white.cpy();
|
public Color color = Color.white.cpy();
|
||||||
/** Effect that happens randomly on top of the affected unit. */
|
/** Effect that happens randomly on top of the affected unit. */
|
||||||
|
|||||||
Reference in New Issue
Block a user