Redwall: Warlords

  • October 21, 2020, 12:26:18 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

RWL Home Page
Don't forget to check out the RWL Facebook page! Stay updated with current RWL news and events.

Author Topic: WildCat: Pressgang formula?  (Read 153 times)

0 Members and 1 Guest are viewing this topic.

Disl

  • Post Master
  • ****
  • Posts: 57
    • View Profile
WildCat: Pressgang formula?
« on: August 26, 2020, 10:57:11 PM »

Anyone know the formula for pressgang?
Logged

windhound

  • Fish Are Loyal
  • Administrator
  • Permanent Resident
  • ******
  • Posts: 5,108
  • omnomnom
    • MSN Messenger - windhound96@yahoo.com
    • AOL Instant Messenger - windhound96
    • Yahoo Instant Messenger - windhound96
    • View Profile
Re: WildCat: Pressgang formula?
« Reply #1 on: August 27, 2020, 03:08:19 PM »

Here you go -

Code: [Select]
        global $users, $lratio, $uera, $cocounter, $spellswork, $config, $cterms;
        if ($lratio >= 90) {
            $peasants = 0.1 * $users[peasants];
            $users[peasants] -= $peasants;
            $amt_armtrp = $peasants * ($users[ind_armtrp] / 100) * $config[armtrp][prod];
            $amt_lndtrp = $peasants * ($users[ind_lndtrp] / 100) * $config[lndtrp][prod];
            $amt_flytrp = $peasants * ($users[ind_flytrp] / 100) * $config[flytrp][prod];
            $amt_seatrp = $peasants * ($users[ind_seatrp] / 100) * $config[seatrp][prod];
            $users[armtrp] += $amt_armtrp;
            $users[lndtrp] += $amt_lndtrp;
            $users[flytrp] += $amt_flytrp;
            $users[seatrp] += $amt_seatrp;
            saveUserData($users, "networth armtrp lndtrp flytrp seatrp peasants");
            if (!$cocounter[hide])
                SpellSucceed(commas($peasants * ($users[ind_armtrp] / 100)) . " $uera[armtrp], " . commas($peasants * ($users[ind_lndtrp] / 100)) . " $uera[lndtrp], " . commas($peasants * ($users[ind_flytrp] / 100)) . " $uera[flytrp], and " . commas($peasants * ($users[ind_seatrp] / 100)) . " $uera[seatrp] have been pressganged to your $cterms[army].");
            $cocounter[armtrp] += $amt_armtrp;
            $cocounter[lndtrp] += $amt_lndtrp;
            $cocounter[flytrp] += $amt_flytrp;
            $cocounter[seatrp] += $amt_seatrp;
        }
        else
            SpellFail("You need " . commas((90 * $users[labs] / $users[raceinfo][magic]) - $users[wizards]) . " more $uera[wizards].");
    }

And I 'spose you'd like the constants -

Code: [Select]
// Troop Production Multipliers
$config[armtrp][prod] = 1.2;
$config[lndtrp][prod] = 0.6;
$config[flytrp][prod] = 0.3;
$config[seatrp][prod] = 0.2;

...we kept the original promi names on the backend, so
peasants = workers
armtrp = rats
lndtrp = weasels
flytrp = stoats
seatrp = skiffs
Logged
A Goldfish has an attention span of 3 seconds...  so do I
~ In the beginning there was nothing, which exploded ~
There are only 10 types of people in the world: Those who understand binary, and those who don't

Disl

  • Post Master
  • ****
  • Posts: 57
    • View Profile
Re: WildCat: Pressgang formula?
« Reply #2 on: August 27, 2020, 05:48:31 PM »

Awesome thank you!

Pretty simple spell. 10% of workers turns into troops.
Logged
 


* Shoutbox

Refresh History
  • JesterAverageJoe: I've been inclined to believe for a while that if someone were able to develop a mobile app for Android or otherwise (w/ custom notifications & such) that that might facilitate a larger userbase~
    July 21, 2020, 03:04:54 AM
  • windhound: It'd take an active coder, and I don't really qualify -- and I'm not sure Shads is up for a complete mobile re-write either.
    July 31, 2020, 09:12:41 PM
  • Shadow: heh. Not so much these days, my free time is pretty limited and coding for fun isn't high on the list anymore
    August 04, 2020, 07:37:38 PM
  • windhound: Hi Shadow!
    August 04, 2020, 07:52:45 PM
  • Uiblis: I might give it a crack if I ever get some free time
    August 06, 2020, 12:20:09 PM
  • Uiblis: already pretty stretched thin between work and maintaining some open source stuff
    August 06, 2020, 12:20:59 PM
  • Uiblis: honestly this whole thing is pretty simple tho I think I could knock the functionality out in a couple of weeks if I tried really hard
    August 06, 2020, 12:23:41 PM
  • JesterAverageJoe: I did want to say that by implementing buttons that executed functions game might be pretty straight forward, but didn't want to come across as rude... also because I'm not very well versed in Android infrastructure :S
    August 06, 2020, 05:00:39 PM
  • Krowdon: It better be an app capable with iOS because that's what I have
    August 06, 2020, 06:09:37 PM
  • Krowdon: Iphone squad
    August 06, 2020, 06:09:42 PM
  • JesterAverageJoe: Blackberry Brotherhood in the house! *chirp* *chirp*
    August 06, 2020, 08:51:41 PM
  • JesterAverageJoe: You reset now!
    August 31, 2020, 05:07:16 PM
  • JesterAverageJoe: You like it!
    August 31, 2020, 05:07:29 PM
  • Disl: lol
    September 01, 2020, 06:14:33 AM
  • windhound: Reset!
    September 01, 2020, 09:33:51 AM
  • JesterAverageJoe: Much obliged, noble sir :D
    September 01, 2020, 09:40:46 AM
  • JesterAverageJoe: ~10 active players?
    September 28, 2020, 11:30:55 AM
  • JesterAverageJoe: If only we could start next set w/ such popular enthusiasm :D
    September 28, 2020, 11:31:59 AM
  • JesterAverageJoe: Will the most honorable admin do the... um.. honors?
    October 01, 2020, 05:30:01 PM
  • windhound: It is done
    October 02, 2020, 07:18:08 AM