[b18] different treatment of spell times

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
marchewka
Thalore
Posts: 156
Joined: Thu Dec 30, 2010 9:52 am

[b18] different treatment of spell times

#1 Post by marchewka »

Regarding spell effects lingering on targets, there's no uniformity of just when do they get removed.

Example:
If the target is "Burning(1)", on the next turn the burning effect disappears (and there's no burn effect on the next round).
To compare - after "Time Prison(1)" there's another round with "Time Prison(0)", when the target is still imprisoned.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: [b18] different treatment of spell times

#2 Post by yufra »

marchewka wrote:Regarding spell effects lingering on targets, there's no uniformity of just when do they get removed.

Example:
If the target is "Burning(1)", on the next turn the burning effect disappears (and there's no burn effect on the next round).
To compare - after "Time Prison(1)" there's another round with "Time Prison(0)", when the target is still imprisoned.
This bug has already been reported here, and actually has to do with fractional durations. Basically the issue is that durations in descriptions are rounded down (5.2 becomes 5) but in terms of the game they are rounded up (5.2 becomes 6).
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [b18] different treatment of spell times

#3 Post by darkgod »

fixed, now setEffect will always round up the duration
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Marcotte
Wyrmic
Posts: 203
Joined: Sat Jan 26, 2008 1:12 am

Re: [b18] different treatment of spell times

#4 Post by Marcotte »

darkgod wrote:fixed, now setEffect will always round up the duration
That's great. While I agree that for the engine itself a deterministic rounding is better, wouldn't it make more sense to use random rounding in the game itself?
I mean using:

Code: Select all

dur = math.floor(dur + rng.float(0,1))
Then a duration of 1.4 turns as 60% chance of lasting 1 turn and 40% chance of lasting 2 turns.

yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Re: [b18] different treatment of spell times

#5 Post by yufra »

Alternatively the setEffect duration could always be floored to stay always match the formatting in the talent descriptions. The %d format always rounds down, so a duration of ([[%d]]):format(1.2) will appear as "1" but actually be 2 right now. All of the effect durations could be forced to use math.ceil as well, but that seems like an invitation for discrepancies and confusion.

EDIT: fixed a typo
Last edited by yufra on Mon Jan 24, 2011 4:11 pm, edited 1 time in total.
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10751
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [b18] different treatment of spell times

#6 Post by darkgod »

You do have a point there ..
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply