worldendDominator wrote:Can't say anything about the first part, but as for the teleport chain: those champions have something like 1 second cooldown between teleports if legendary, is that what you're experiencing? Or is it actually broken?
class champion_LDoomDelayer : thinker {
actor holder;
class<thinker> champColor;
int controllerID;
bool colours;
bool icons;
bool particles;
bool bundles;
bool given; //This is new.
double icon_scale;
double icon_alpha;
int mutationchance;
int mutation;
bool ld_dormant;
bool ld_boost;
bool ld_additive;
override void Tick() {
super.Tick();
if (level.time >= 3) {
string ldtoken = "LDLegendaryMonsterToken";
if (holder && holder.CountInv(ldtoken)) {
holder.A_GiveInventory("champion_PersistentInfo");
let info = champion_PersistentInfo(holder.FindInventory("champion_PersistentInfo"));
if (info) {
info.c = champColor;
info.i = controllerID;
}
let controller = champion_BaseController(new(champColor));
if (controller && !given) { //So it can't activate if already given.
controller.champion = holder;
controller.colours = colours;
controller.icons = icons;
controller.particles = particles;
controller.bundles = bundles;
controller.mutationchance = mutationchance;
controller.mutation = mutation;
controller.legend = true;
controller.ld_dormant = ld_dormant;
controller.ld_boost = ld_boost;
controller.icon_scale = icon_scale;
controller.icon_alpha = icon_alpha;
given = true; //Set to given to make sure the base controller is only instantiated once!
}
}
if(ld_additive)
return;
self.Destroy();
return;
}
}
}
Untitled wrote:It's actually broken, but I've finally figured out why. (Also, here's some screenshots of the bug: https://imgur.com/a/mV0YA54)
Basically, in delayer.txt, during the Tick() function, the champion_LDoomDelayer gives the champion_BaseController to given monsters if they're legendary, but the only check to see if it should give the controller is if A: the monster is legendary and B: if the level time is greater than 3. This means that if a monster is legendary, if the monster goes legendary post-start (to be honest I don't know why this is the case), the base controller is given to the monster once per tic, which means that the legendary effects trigger once per tic - for some effects, this will cause it to immediately activate, which results in the infinite 1-tic teleport chain.
Spoiler: Changelog
Users browsing this forum: Gorec, salahmander2 and 11 guests