Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

[harlowe] Bad at math, or harlowe's fail?

$
0
0
I have this passage.
{
(if: $loverace is "human" or it is "half ogre")[(set: $loveagemodifier to 1)]

(elseif: $loverace is "dwarf")[(set: $loveagemodifier to 5)]

(elseif: $loverace is "elf" or it is "dark elf")[(set: $loveagemodifier to 10)]

(elseif: $loverace is "half elf")[(set: $loveagemodifier to 1.75)]

(elseif: $loverace is "gnome")[(set: $loveagemodifier to 4.5)]

(elseif: $loverace is "halfling")[(set: $loveagemodifier to 2.5)]

(elseif: $loverace is "half orc")[(set: $loveagemodifier to 0.75)]

(set: $loveage to (round: ($pcage / (($pcagemodifier / $loveagemodifier) + ((random: 90,110) * 0.01)))))
}

It's supposed to grab a certain age modifier from both the player and the love interest, depending on their races, ad or substract a random percentage (10% in this case), and apply the equation to translate the player's age into a apropriate age for the love interest. (aka, no 45 years old man courting a teenage elf)

I'm just this bad at math, that I can't spot the mistake I probably made yesterday due to lack of sleep. Can you help me?

Viewing all articles
Browse latest Browse all 1844

Trending Articles