- Jan 6, 2021
- Reaction score
- First Language
- Primarily Uses
The documentation for the Battle Core doesn't say these notetags recognize a and b. It says to use user and target.I actually did try Pre-Damage before. It was the same thing. 0 dmg with or without states.
Probably because value already exists and you're trying to redefine it, so it's probably causing an error and returning 0. (edit: I thought you had "const" on the beginning of that line but you don't. Try adding console.log statements to each part and see where it stops logging)I actually did try Pre-Damage before. It was the same thing. 0 dmg with or without states.
Hrm, I dunno then. @hiddenone I'd guess you don't actually have either of those states on. I don't see anything else that would make it 0 out.It actually does.
I figured it wasn't passives since he said negative state, but good question.
Yeah, I wanted to separate the two unless there was only an answer for one of them, but I could have worded that more clearly.
I'm thinking about ways to make my debuff-curing items a little more useful. Therefore, I would like to check whether a target has any negative states — that is, states with the '<Negative State>' notetag. How would I do that?
target.statesByCount("negative").lengthAnd if it isn't overly complicated, I would also like to have the option to grant a bonus (like some TP) per debuff cleared, so if you could also tell me how to count those negative states, that'd be awesome!
<JS Pre-Damage As User> user.gainHp(user.skillTpCost(this.item())); </JS Pre-Damage As User>
Ah, sorry. That's because items don't have a TP cost I think. TryHi again!
You provided me with the code above for a piece of armour which, after using a skill, restores HP equal to the TP cost of that skill. It worked perfectly for skills, but seems to cause this error when a healing item is used:
View attachment 219478
Is there another way of doing it which prevents this error?
<JS Pre-Damage As User> if (DataManager.isSkill(this.item()) user.gainHp(user.skillTpCost(this.item())); </JS Pre-Damage As User>
Yeah, that should be doable. I'll have a crack at it later, got kitchen renovations and coding today!That works, thank you.
With this out of the way, I was able to test the other code snippet for bonus effects when removing negative states. What I have is this:
<State Negative Category Remove: All>
target.gainTp(target.statesByCount("Negative").length * 5);
Which, unfortunately, doesn't work. Do you have an idea why?
Ideally, the item would only generate TP for each state actually removed, not just counted. To be honest, I don't have any plans of including states of the 'Negative' category that can't be removed with this item, but it's better to have too much design space than too little, right? So, should you have an idea how to implement this, that would be even better.
You need the PIXI JS filters plugin. It comes in the 8 Waves Bundle. Put it all the way at the top in the Plugin Manager. Or turn off Bright Effects and Horror Effects. There might be a couple more that use PIXI, but those are the two I know off the top of my head.
Thanks, your advice helped me to fix my problem. I didn't use the PIXI JS filter plugin. What is that used for anyway? Also does anyone know where I can find a plugin for targetting enemies in groups (like lines of enemies)? If not that's fine.You need the PIXI JS filters plugin. It comes in the 8 Waves Bundle. Put it all the way at the top in the Plugin Manager. Or turn off Bright Effects and Horror Effects. There might be a couple more that use PIXI, but those are the two I know off the top of my head.