New Content - Implemented Ultracolor™ shirt new mechanic

Veracity

Developer
Staff member
The Ultracolor™ shirt grants prismatic damage: +X of each element. X is believed to be the number of active buffs (non-intrinsics).

We could extend the Modifier Expression language to handle this.
Alternatively, we can treat this as a unique case, like Tuesday's Ruby.
 

Bale

Minion
I have a feeling that this will not be the first time this mechanic is ever used. This seems, to me, like the type of thing that will tickle jick's fancy to employ again now that he has had CDM code a way to implement it. While I could be wrong, I think the former solution will save trouble in the future.
 

Veracity

Developer
Staff member
Hmm, some motivation to extend the modifier language would be Ol' Scratch. Just a thought.
An obscure thought. One that went right by me.

Ol' Scratch can remove buffs in the middle of combat. Why is that "motivation to extend the modifier language" as opposed to "treating the item like Tuesday's Ruby"? What do YOU think the difference in the implementation techniques is, such that Ol' Scratch would behave any different for one vs. the other?
 

heeheehee

Developer
Staff member
I suppose it would simplify the writing a combat consult script to handle said fight. Extremely situational, though.

I only mentioned it because I thought that might use the same internal mechanic on KoL's side.
 

Theraze

Active member
If Ol' Scratch or the Naughty Sorceress debuff you, does the prismatic shirt update to realize that you've lost your bonus damage?
 

lostcalpolydude

Developer
Staff member
I cast a skill on myself in the relay browser and watched it instantly update in the Gear Changer. I assume that as soon as mafia parses the charpane it gets updated.
 

Veracity

Developer
Staff member
Yes. And when you get a new effect (or lose an existing effect), modifiers are immediately recalculated.
 

heeheehee

Developer
Staff member
If Ol' Scratch or the Naughty Sorceress debuff you, does the prismatic shirt update to realize that you've lost your bonus damage?

Good question. I've got a basement with Scratch up, probably. Unfortunately, said multi doesn't have Torso. Blargh.

Fortunately, said multi hasn't ascended in forever, and thus still has a moon unit! For spading!
Oh no, you shot Marvin in the face! Provided that this monster's name is Marvin. In any case, it did 619 (+1) (+49) (+98) (+49) (+108) damage...
You shoot him in the gut for 604 (+1) (+39) (+78) (+39) (+88) damage...
Signs point to yes.
 

heeheehee

Developer
Staff member
I threw together a patch for extending the modifier language (via the previously unused 'E').

The one issue I noticed with lost's patch was that activeEffects includes intrinsics. I wasn't entirely sure how to handle this (I tried... and ran into a stack overflow). I'm pretty sure everything else works just fine, though.
 

Attachments

  • ultracolor.patch
    2.4 KB · Views: 21

xKiv

Active member
I threw together a patch for extending the modifier language (via the previously unused 'E').

Why? Wouldn't it be better (and cleaner) if # of active effects was available as a standard tracked modifier (which are also available from ASH)? (or are those unavailable in modifier language?)
 

Theraze

Active member
If the modifier language is extended, can't you use modifier_eval("E") to see the results, just like modifier_eval("X") is the only way to tell your character's gender currently without another server hit?
 

heeheehee

Developer
Staff member
Why? Wouldn't it be better (and cleaner) if # of active effects was available as a standard tracked modifier (which are also available from ASH)? (or are those unavailable in modifier language?)

I'm under the impression that this is the case (standard modifiers are unavailable in the modifier language). Also, as Theraze mentioned, you can retrieve the result via modifier_eval.

Also still looking into a good way to count intrinsics (or non-intrinsics) -- activeEffects doesn't make the distinction, and anything that makes a call to methods of Modifiers ends up in a stack overflow.
 

Veracity

Developer
Staff member
There is nothing in KoLmafia which tells you if an effect is intrinsic. If it is granted by equipment, we can tell, but Expert Timing or Missing Kidney, for example, come from other sources.

The solution is to keep activeEffects the complete list of effects - as now - but have a new list intrinsicEffects which is filled with just the intrinsics when we parse the charpane.

That will also allow us to not decorate intrinsic effects with remove links.

I'm working on it.

Or, you know, if the "duration" of the effect in activeEffects is Integer.MAX_VALUE, it's an intrinsic.

I think I'll go with that. Maybe.
 
Last edited:

heeheehee

Developer
Staff member
Thanks for taking the time to implement this, Veracity. As always, much appreciated (even if I rarely encounter the effects of said code).

( thought that building a list of intrinsics was the way to go, but I wasn't entirely sure where to poke around. Thanks, again! )
 
Top