Slow poison effect issue FIXED
Re: Slow poison effect issue IMPLEMENTED
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.
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
-
- Site Admin
- Posts: 15741
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Slow poison effect issue IMPLEMENTED
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);
}
}
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);
}
}
Re: Slow poison effect issue IMPLEMENTED
Is there really no other way than two options:
a) reverse changes
b) keep changes
?
Because honestly - neither is very consistent.
a) reverse changes
b) keep changes
?
Because honestly - neither is very consistent.
Age of Strategy design leader
- makazuwr32
- Posts: 7830
- Joined: Tue Oct 17, 2017 9:29 am
- Location: Moscow, Russia
Re: Slow poison effect issue IMPLEMENTED
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.
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.
AoF Dev Co-Leadermakazuwr32 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™.
-
- Site Admin
- Posts: 15741
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Slow poison effect issue IMPLEMENTED
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 )
(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 )
- makazuwr32
- Posts: 7830
- Joined: Tue Oct 17, 2017 9:29 am
- Location: Moscow, Russia
Re: Slow poison effect issue IMPLEMENTED
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.
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.
AoF Dev Co-Leadermakazuwr32 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™.
-
- Site Admin
- Posts: 15741
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Slow poison effect issue IMPLEMENTED
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);
}
}
- makazuwr32
- Posts: 7830
- Joined: Tue Oct 17, 2017 9:29 am
- Location: Moscow, Russia
Re: Slow poison effect issue IMPLEMENTED
Nope. If unit moved and got after that extra speed it still must not be able to move.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);
}
}
Unless i got it wrong.
AoF Dev Co-Leadermakazuwr32 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™.
Re: Slow poison effect issue IMPLEMENTED
Yeah it's better to leave old one.
New modification makes things too abusable.
New modification makes things too abusable.
Age of Strategy design leader
-
- Site Admin
- Posts: 15741
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Slow poison effect issue IMPLEMENTED
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?
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?
- makazuwr32
- Posts: 7830
- Joined: Tue Oct 17, 2017 9:29 am
- Location: Moscow, Russia
Re: Slow poison effect issue IMPLEMENTED
than what the difference with current situation?
in current situation we also can add movement and move.
I don't understand.
in current situation we also can add movement and move.
I don't understand.
AoF Dev Co-Leadermakazuwr32 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™.
Re: Slow poison effect issue IMPLEMENTED
Sorry.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?
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
-
- Site Admin
- Posts: 15741
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Slow poison effect issue IMPLEMENTED
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);
}
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);
}
-
- Site Admin
- Posts: 15741
- Joined: Fri Apr 25, 2014 9:28 pm
Re: Slow poison effect issue IMPLEMENTED
It seems to work perfectly like asked.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);
}
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
- makazuwr32
- Posts: 7830
- Joined: Tue Oct 17, 2017 9:29 am
- Location: Moscow, Russia
Re: Slow poison effect issue IMPLEMENTED
If endru says so than i agree with this change.
AoF Dev Co-Leadermakazuwr32 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™.
Re: Slow poison effect issue IMPLEMENTED
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
- makazuwr32
- Posts: 7830
- Joined: Tue Oct 17, 2017 9:29 am
- Location: Moscow, Russia
Re: Slow poison effect issue IMPLEMENTED
I know that.
We will update some abilities acfording to that.
We will update some abilities acfording to that.
AoF Dev Co-Leadermakazuwr32 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™.