Slow poison effect issue FIXED

User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Slow poison effect issue IMPLEMENTED

Post by Endru1241 »

But it's not second movement.

Second move is only applied if at the exact moment of casting target unit already moved.

It's inconsistent - that is the problem.



Looking at some old posts I thought, that general plan for movement was:
- normal units always move only 1 time at max
- normal speed boosts only give more movement
- there is some plan for unit spec or effect, that allows 2nd move or total move split
Only for special effect ot units.
Not as a standard, that on top of being too common (especially when you'll look at bard and druid common usage in SoS) is working in different ways for different cases.
Age of Strategy design leader
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Slow poison effect issue IMPLEMENTED

Post by Stratego (dev) »

i still not think it is a problem.

ok, so here we are
Q: shall i undo what i did was that better situation?

or with this simple (red) modification will that be better?

int rangeWalkSave = u.rangeWalk;
boolean wasMoved = u.getRemainingMovement() == 0 && u.getMovementRange() > 0;
u.rangeWalk += addMagnitude(uc.rangeWalk * m, addendum); // how far it can walk
//now add to the remaining movement the same addendum, only if it was not moved yet!
if (!wasMoved) {
int delta = u.rangeWalk - rangeWalkSave;
if (delta != 0) {
int finalSpeed = u.getRemainingMovement() + delta;
if (finalSpeed < 0)
finalSpeed = 0;
if (finalSpeed > u.getMovementRange())
finalSpeed = u.getMovementRange();
if (finalSpeed != u.getRemainingMovement())
u.setRemainingMovement(finalSpeed, false);
}
}
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Slow poison effect issue IMPLEMENTED

Post by Endru1241 »

Is there really no other way than two options:
a) reverse changes
b) keep changes
?

Because honestly - neither is very consistent.
Age of Strategy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Slow poison effect issue IMPLEMENTED

Post by makazuwr32 »

Old system is better. I even have an idea how to abuse it.

For example in aof warfell right now has 4 ways to buff speed on pegasus knight unit. And 2 of them are auras which you can use this way: move unit, move aura, get extra movement, move again outside from aura, repeat the process.

.

Alas we still need to remove that inability to move when unit looses debuff for speed.
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
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Slow poison effect issue IMPLEMENTED

Post by Stratego (dev) »

i posted above my suggestions.
(atm i dont have will to modify the code in several (40+) places to introduce a "wasMoved" flag - and not even to modify but to test all out :))
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Slow poison effect issue IMPLEMENTED

Post by makazuwr32 »

I prefer current situation.
If unit moved than no matter for buffs it must stop.

Ofc we wanted to add a tag for some units that will allow for them to move and retreat in same turn if they did not use full their movement when moved BUT that is for some specific units and not as mechanic for every unit who gains any bonus speed.
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
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Slow poison effect issue IMPLEMENTED

Post by Stratego (dev) »

i mean i posted this:
Stratego (dev) wrote: Wed Oct 13, 2021 3:38 pm i still not think it is a problem.

ok, so here we are
Q: shall i undo what i did was that better situation?

or with this simple (red) modification will that be better?

int rangeWalkSave = u.rangeWalk;
boolean wasMoved = u.getRemainingMovement() == 0 && u.getMovementRange() > 0;
u.rangeWalk += addMagnitude(uc.rangeWalk * m, addendum); // how far it can walk
//now add to the remaining movement the same addendum, only if it was not moved yet!
if (!wasMoved) {
int delta = u.rangeWalk - rangeWalkSave;
if (delta != 0) {
int finalSpeed = u.getRemainingMovement() + delta;
if (finalSpeed < 0)
finalSpeed = 0;
if (finalSpeed > u.getMovementRange())
finalSpeed = u.getMovementRange();
if (finalSpeed != u.getRemainingMovement())
u.setRemainingMovement(finalSpeed, false);
}
}
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Slow poison effect issue IMPLEMENTED

Post by makazuwr32 »

Stratego (dev) wrote: Wed Oct 13, 2021 4:09 pm i mean i posted this:
Stratego (dev) wrote: Wed Oct 13, 2021 3:38 pm i still not think it is a problem.

ok, so here we are
Q: shall i undo what i did was that better situation?

or with this simple (red) modification will that be better?

int rangeWalkSave = u.rangeWalk;
boolean wasMoved = u.getRemainingMovement() == 0 && u.getMovementRange() > 0;
u.rangeWalk += addMagnitude(uc.rangeWalk * m, addendum); // how far it can walk
//now add to the remaining movement the same addendum, only if it was not moved yet!
if (!wasMoved) {
int delta = u.rangeWalk - rangeWalkSave;
if (delta != 0) {
int finalSpeed = u.getRemainingMovement() + delta;
if (finalSpeed < 0)
finalSpeed = 0;
if (finalSpeed > u.getMovementRange())
finalSpeed = u.getMovementRange();
if (finalSpeed != u.getRemainingMovement())
u.setRemainingMovement(finalSpeed, false);
}
}
Nope. If unit moved and got after that extra speed it still must not be able to move.

Unless i got it wrong.
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
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Slow poison effect issue IMPLEMENTED

Post by Endru1241 »

Yeah it's better to leave old one.

New modification makes things too abusable.
Age of Strategy design leader
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Slow poison effect issue IMPLEMENTED

Post by Stratego (dev) »

did u see the code change with red?
that means it will NOT ADD the extra speed if unit already moved.
it will add dthe extra if the unit have yet moved this turn.

istn that you wanted?
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Slow poison effect issue IMPLEMENTED

Post by makazuwr32 »

than what the difference with current situation?
in current situation we also can add movement and move.

I don't understand.
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
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Slow poison effect issue IMPLEMENTED

Post by Endru1241 »

Stratego (dev) wrote: Wed Oct 13, 2021 4:25 pm did u see the code change with red?
that means it will NOT ADD the extra speed if unit already moved.
it will add dthe extra if the unit have yet moved this turn.

istn that you wanted?
Sorry.

I mist have misunderstood something.

If this code works for every speed change, then it should block the thing I was afraid of.

Could you please build and upload, just to check in game and be sure?
Age of Strategy design leader
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Slow poison effect issue IMPLEMENTED

Post by Stratego (dev) »

ok, this is the fiunal code though

int rangeWalkSave = u.rangeWalk;
boolean wasMoved = u.getRemainingMovement() == 0 && u.getMovementRange() > 0;
u.rangeWalk += addMagnitude(uc.rangeWalk * m, addendum); // how far it can walk
//now add to the remaining movement the same addendum, only if it was not moved yet!
int delta = u.rangeWalk - rangeWalkSave;
if (delta != 0 && (delta <0 || !wasMoved)) {
int finalSpeed = u.getRemainingMovement() + delta;
if (finalSpeed < 0)
finalSpeed = 0;
if (finalSpeed > u.getMovementRange())
finalSpeed = u.getMovementRange();
if (finalSpeed != u.getRemainingMovement())
u.setRemainingMovement(finalSpeed, false);
}
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Slow poison effect issue IMPLEMENTED

Post by Stratego (dev) »

uos 5
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Slow poison effect issue IMPLEMENTED

Post by Endru1241 »

Stratego (dev) wrote: Wed Oct 13, 2021 4:55 pm ok, this is the fiunal code though

int rangeWalkSave = u.rangeWalk;
boolean wasMoved = u.getRemainingMovement() == 0 && u.getMovementRange() > 0;
u.rangeWalk += addMagnitude(uc.rangeWalk * m, addendum); // how far it can walk
//now add to the remaining movement the same addendum, only if it was not moved yet!
int delta = u.rangeWalk - rangeWalkSave;
if (delta != 0 && (delta <0 || !wasMoved)) {
int finalSpeed = u.getRemainingMovement() + delta;
if (finalSpeed < 0)
finalSpeed = 0;
if (finalSpeed > u.getMovementRange())
finalSpeed = u.getMovementRange();
if (finalSpeed != u.getRemainingMovement())
u.setRemainingMovement(finalSpeed, false);
}
It seems to work perfectly like asked.

Tested and:
- when unit is affected by slowing poison - it regains movement upon healing
- when unit already moved and move geass is casted on it - IT DOES NOT regain any movement this turn. Nothing changes even when adventure song is casted on top of it.
- when unit was affected by speed reducing effect and it ends naturally - unit regains movement on the turn effect stopped, so essentially it is now fully consistent with other debuffs - 1 turn debuff won't last up to enemy turn.

As far as I think about it - it is elegantly working, like player or modder could expect.

Many thanks.
Age of Strategy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Slow poison effect issue IMPLEMENTED

Post by makazuwr32 »

If endru says so than i agree with this change.
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
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Slow poison effect issue IMPLEMENTED

Post by Endru1241 »

makazuwr32 wrote: Wed Oct 13, 2021 6:26 pm If endru says so than i agree with this change.
Just beware, as previously last turn of speed decrease gave lower movement and it won't anymore, so effectively all slowdown effects are 1 turn shorter.

Just like any other decrease of parameters, that need to be used on unit turn.
Age of Strategy design leader
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Slow poison effect issue IMPLEMENTED

Post by makazuwr32 »

I know that.
We will update some abilities acfording to that.
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
Post Reply

Return to “Units/techs/effects”