No, actually, I caused that fixing another bug. (Specifically, on the arena page, James Clone was showing up as James Paige, etc.)
PS. it's fixed now
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
The generic solution is to call the clone "Foo Clone," but then there are also hardcoded rules for the three people who actually know the attack.
A clever replacement scheme like you mention would be awesome but impractical for this purpose. Besides, it would be tough for it to come up with "Clonelaw."
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
A clever replacement scheme like you mention would be awesome but impractical for this purpose. Besides, it would be tough for it to come up with "Clonelaw."
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Gosh I love regular expressions :)
Something like this should do the trick.
Cloneehay
Fenrir-Clonearis
Clonetis
James Clone
Clonerompe
Clonein
Cloneri
Newbie Clone
Cloneja
CloneMaverickZero
Rock & Roll Clone
Spoonweaver Clone
Clonelaw
Clone drizzle
TwinCloneclusive
Cloneoka
Something like this should do the trick.
Code:
function mutate_name($name, $substring, $soundalike_array){
// Match leading "the" and replace it
if(preg_match("/^the /i", $name)){
return preg_replace('/^the (.*)$/i', $substring." $1", $name);
}
// Match soundalike substrings
foreach($soundalike_array as $soundalike){
if(preg_match("/".preg_quote($soundalike)."/i", $name)){
return preg_replace('/^(.*)'.preg_quote($soundalike).'(.*)$/i', "$1".$substring."$2", $name);
}
}
// Match any multi-word name and replace the part after the last space
if(preg_match("/ [A-Z0-9]+$/i", $name)){
return preg_replace('/(^.*)( [A-Z0-9]+$)/i', "$1 ".$substring, $name);
}
// Match any single-word name starting with consonant-vowel-consonant and replace the prefix
if(preg_match('/^[BCDFGHJKLMNPQRSTVWXZ][AEIOUY][BCDFGHJKLMNPQRSTVWXZ][^ ]+$/i', $name)){
return preg_replace("/^[BCDFGHJKLMNPQRSTVWXZ][AEIOUY][BCDFGHJKLMNPQRSTVWXZ](.*)$/i", $substring."$1", $name);
}
//If all else fails, just append
return $name." ".$substring;
}
function mutate_name($name, $substring, $soundalike_array){
// Match leading "the" and replace it
if(preg_match("/^the /i", $name)){
return preg_replace('/^the (.*)$/i', $substring." $1", $name);
}
// Match soundalike substrings
foreach($soundalike_array as $soundalike){
if(preg_match("/".preg_quote($soundalike)."/i", $name)){
return preg_replace('/^(.*)'.preg_quote($soundalike).'(.*)$/i', "$1".$substring."$2", $name);
}
}
// Match any multi-word name and replace the part after the last space
if(preg_match("/ [A-Z0-9]+$/i", $name)){
return preg_replace('/(^.*)( [A-Z0-9]+$)/i', "$1 ".$substring, $name);
}
// Match any single-word name starting with consonant-vowel-consonant and replace the prefix
if(preg_match('/^[BCDFGHJKLMNPQRSTVWXZ][AEIOUY][BCDFGHJKLMNPQRSTVWXZ][^ ]+$/i', $name)){
return preg_replace("/^[BCDFGHJKLMNPQRSTVWXZ][AEIOUY][BCDFGHJKLMNPQRSTVWXZ](.*)$/i", $substring."$1", $name);
}
//If all else fails, just append
return $name." ".$substring;
}
Code:
echo mutate_name($name, "Clone", array("con", "lun"))
Cloneehay
Fenrir-Clonearis
Clonetis
James Clone
Clonerompe
Clonein
Cloneri
Newbie Clone
Cloneja
CloneMaverickZero
Rock & Roll Clone
Spoonweaver Clone
Clonelaw
Clone drizzle
TwinCloneclusive
Cloneoka
Hahaha.
Like I said, awesome but impractical.
(edit) I didn't know you knew PHP.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Like I said, awesome but impractical.
(edit) I didn't know you knew PHP.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Sir Goowain seems to be stuck saying "You didn't select an attack" in battle 764
EDIT: nevermind. I don't know how, but he became unstuck.
Also, why does he love Toxic Spew so much now? It is hardly his best move.
EDIT: nevermind. I don't know how, but he became unstuck.
Also, why does he love Toxic Spew so much now? It is hardly his best move.
James Paige wrote:
Sir Goowain seems to be stuck saying "You didn't select an attack" in battle 764
EDIT: nevermind. I don't know how, but he became unstuck.
EDIT: nevermind. I don't know how, but he became unstuck.
Weird. I'm not sure how that would happen.
Quote:
Also, why does he love Toxic Spew so much now? It is hardly his best move.
He's basing it on the attack's total damage (which works out to nearly 200 over 20 turns), which is silly. I've revised the formula to only consider 6 rounds of damage. He'll be using it much less often now.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
So the Knight helm improves your Str, Agi, and Int by 5 points each, and your HP by 250. Those are some pretty decent boosts considering how difficult it is to actually get it.
Also, how exactly are slimebucks rewards calculated? I know the dope bling doubles your rewards, but there must be some sort of predicable algorithm to determine it. Having multiple partners on the winning team does seem to reduce it.
To friends long gone, and those I've yet to meet - thank you.
Also, how exactly are slimebucks rewards calculated? I know the dope bling doubles your rewards, but there must be some sort of predicable algorithm to determine it. Having multiple partners on the winning team does seem to reduce it.
To friends long gone, and those I've yet to meet - thank you.
The basic idea is that everyone has a "score" based on the sum of their stats. You are rewarded based on the sum of enemies' scores; additionally, you get a bonus for winning against an enemy with a higher score.
Here is the exact math on it in pseudocode:
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Here is the exact math on it in pseudocode:
Code:
$u_score = $battler['max_hp'] / 10 + $battler['max_mp'] / 5 + $battler['max_agi'] + $battler['max_str'] + $battler['max_int'];
foreach($enemy) {
$e_score = $enemy['max_hp'] / 10 + $enemy['max_mp'] / 5 + $enemy['max_agi'] + $enemy['max_str'] + $enemy['max_int'];
$reward = $e_score;
if ($e_score > $u_score) $reward += ($e_score - $u_score) * 2;
$battlers[$id]['reward'] += $reward / 5;
// Dope Bling: Double S$
}
if ($battler['hp'] <= 0) $battler[$id]['reward'] *= 0.9;
$u_score = $battler['max_hp'] / 10 + $battler['max_mp'] / 5 + $battler['max_agi'] + $battler['max_str'] + $battler['max_int'];
foreach($enemy) {
$e_score = $enemy['max_hp'] / 10 + $enemy['max_mp'] / 5 + $enemy['max_agi'] + $enemy['max_str'] + $enemy['max_int'];
$reward = $e_score;
if ($e_score > $u_score) $reward += ($e_score - $u_score) * 2;
$battlers[$id]['reward'] += $reward / 5;
// Dope Bling: Double S$
}
if ($battler['hp'] <= 0) $battler[$id]['reward'] *= 0.9;
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Fenrir-Lunaris wrote:
So the Knight helm improves your Str, Agi, and Int by 5 points each, and your HP by 250. Those are some pretty decent boosts considering how difficult it is to actually get it.
Also, how exactly are slimebucks rewards calculated? I know the dope bling doubles your rewards, but there must be some sort of predicable algorithm to determine it. Having multiple partners on the winning team does seem to reduce it.
Also, how exactly are slimebucks rewards calculated? I know the dope bling doubles your rewards, but there must be some sort of predicable algorithm to determine it. Having multiple partners on the winning team does seem to reduce it.
I've been helping some of the guys with lower stats get helmets.
Feel free to sign me up in a challenge if you need help.
And I think slimebuck rewards are determined by a comparison between stats.
If your stats are much higher than your opponent, then the returns will diminish.
♪♪♪ Du du duuuu ♪♪♪
Twinconclusive wrote:
If your stats are much higher than your opponent, then the returns will diminish.
See above. You aren't penalized for battling weaker opponents.
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
Mogri wrote:
Code:
$battlers[$id]['reward'] += $reward / 5;
I don't understand this part. I think it's the += operator. Is that adding to the variable's current total?
But does this randomize at all? I plugged the numbers from 776 into the equation, and came up with Sludgehammer's score being 636 and Twin's being 576, both assuming HP/MP rounds down. Twice the difference would make 120 (118 if the rounding is normal), but the rewards came out to 117.
There's enough done to the "rewards" variable I don't get there, so I did just stick with the one cut and dry equation I saw. Plugging any of the others doesn't give results anywhere near what the battle came out with, so I'm wandering if it's randomized.
Or, as is very likely, I just don't speak pseudocode.
It's not randomized.
"a *= b" means "a = a * b"
"a += b" means "a = a + b"
and so on. In all cases, I think it doesn't round down until the last step -- nothing is an integer unless explicitly told to be.
I forgot the final step, which may be important for your calculations: the reward is divided by the number of players on the winning team (including bots, but not clones).
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks
"a *= b" means "a = a * b"
"a += b" means "a = a + b"
and so on. In all cases, I think it doesn't round down until the last step -- nothing is an integer unless explicitly told to be.
I forgot the final step, which may be important for your calculations: the reward is divided by the number of players on the winning team (including bots, but not clones).
Mega Tact v1.1
Super Penguin Chef
Wizard Blocks



