Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > The Fantasy Trip

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 04-30-2019, 06:47 PM   #11
Helborn
 
Join Date: Aug 2005
Default Re: TFT Helper - beta test of app

Quote:
Originally Posted by Fuhrmanator View Post
The bug with carrying over dx penalty still exists. See the proof below.

It's never too late for unit tests! I wrote a bunch for melee before, but probably not in the language you're using? If the app is free, you can consider open sourcing the code?

http://i.imgur.com/PZzCAM2.jpg

Edit: here's some source for a sample unit-test (hope you can get the idea) that asserts that no dx penalty occurs at the start of the round, that it exists after the hero takes 5 hits, and that it persists for at least an entire round:

dexPenaltyLastsOneCompleteRound: function (o) {
assert(o.hero.sufferingDexPenalty()).not();
o.hero.takeHits(5);
assert(o.hero.sufferingDexPenalty());
o.hero.newRound();
assert(o.hero.damageTakenThisRound()).equals(0);
assert(o.hero.sufferingDexPenalty());
o.hero.newRound();
assert(o.hero.sufferingDexPenalty()).not();
},

The "takeHits" needs to be >=5
The "damageTakenThisRound()).equals(0) is incorrect because the DX penalty exists regardless of how much damage is taken or not taken.
Also, the penalty is only supposed to exist from one action phase to the next.

I haven't see how you define "newRound" but I think it needs clarification.


Char A takes action, then suffers 5 hits. Next turn, takes another 5 hits before he can act, DX penalty is only -2 though 10 points of damage was taken over 2 turns. And he is not knocked down and, unless his ST is now 3 or less, does not suffer the additional -3 DX penalty.
__________________
Helborn
Helborn is offline   Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 01:02 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.