Status change inversion

Post Reply
User avatar
Sunrise Samurai
Posts: 2678
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Status change inversion

Post by Sunrise Samurai »

Been having trouble with buffs and debuffs self adjusting to the base unit stats, then adjusting in the opposite direction when they end. Fear becomes a buff this way, and in my picture here I ended up with a very lazy halberdier who won't attack because double strike ended up giving a permanent -1 to actions.
Image
The glorious sun rises again
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Status change inversion

Post by makazuwr32 »

Is it after upgrade of halberdiers?
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
General Brave
Posts: 4662
Joined: Thu Oct 19, 2017 3:12 am
Location: The Four Point Military Academy.

Re: Status change inversion

Post by General Brave »

I'm guessing this is after a enemy magic user use a negative spell on him.
Wise, Might, Loyalty. Forever stands Warfell.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Status change inversion

Post by makazuwr32 »

Uhm. As for me everything worked fine with disenchant.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
General Brave
Posts: 4662
Joined: Thu Oct 19, 2017 3:12 am
Location: The Four Point Military Academy.

Re: Status change inversion

Post by General Brave »

It's not like that, if one of my archers got curse. After the effect wears off, it becomes plus not negative.
Wise, Might, Loyalty. Forever stands Warfell.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Status change inversion

Post by Stratego (dev) »

sunrise: please tell me these
- do u use the latest dev version? (uploaded about 2 days ago - where there were a fix attempt on these enchantment like effects)
- if so, how to reproduce this?
User avatar
Sunrise Samurai
Posts: 2678
Joined: Thu Jun 18, 2015 11:21 pm
Location: Florida, U.S.

Re: Status change inversion

Post by Sunrise Samurai »

If you uploaded 2 days ago it's probably not the latest. I'll download now. There's no post in dev version topic so I didn't update, sorry.
The glorious sun rises again
HokanPL
Posts: 342
Joined: Sun Sep 13, 2015 10:37 pm

Re: Status change inversion

Post by HokanPL »

I don't know EXACTLY (I mean the code inside a game) how it works, so below I give my analysis Maybe this will help.

At first you, devs, have to decide if fear has to change action value to 0 for all units (no matter if they have 1 action per turn, 2+ actions by default and/or because of "double strike effect"), or to decrease it with -1. First option is much harder to code right because of many possibilities with effects' combinations (it's even worse if somebody changes "actions" value in map editor for missions).

I could describe tens of possible combinations of Powers/effects, but let's focus on this situation:

*Atack per turn = APT to make it shorter

WHAT WE HAVE NOW (speculation mode)
Halberdier. Nice guy, but he doesn't like his job. He can attack once per turn. Priest comes nearby and strikes him twice with his stab to motivate him. +1 APT, so now APT=2. But then the mummy comes and attack our motivated halberdier with "Fear". APT=0 (but it isn't APT=2-2=0, just APT=0, for programmer this is a huge difference: you can set completely new value or modify existing one). Then halberdier wants to attack, but "Double strike" motivation effect ends and APT=0-1=-1 (Another reality or something). But the mummy is killed by halberdier's friends swordsman, so "fear" disappeares soon and isn't refreshed. APT=-1+1=0.
You see? It this case, because of "fear", APT was decreased with -2 (in practice, because in technical view it was reseted to 0), and then was increased with +1 only.

POSSIBLY SOLUTION:
"Fear" should a.l.w.a.y.s. decrease APT with -1, so for example quick archer affected with this debuff should be able to shoot once (APT=2(base value) -1=1).
Or "Fear" can reset APT to 0 in all cases, but the value which was used to lower APT to 0 has to be stored in game memory and added after eliminating debuff.

..........
Yeah, it sounds complicated. You know, #gamedev_stuff 😂
Post Reply

Return to “Archived - Reporting Issues”