Skip to content

Instantly share code, notes, and snippets.

@tchalvak
Created August 29, 2009 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tchalvak/177381 to your computer and use it in GitHub Desktop.
Save tchalvak/177381 to your computer and use it in GitHub Desktop.
<?php
} else if ($victom == "Thief") { // You only get ganged up on by the thieves if you're already trying to attack the theif.
// Check the counter to see whether they've attacked a thief multiple times in a row.
if(SESSION::get('counter')){
$counter = SESSION::get('counter');
} else {
$counter = 1;
}
$counter = $counter + 1;
SESSION::set('counter', $counter); // Save the current state of the counter.
if ($counter>30) { // Only after 30 attacks on the thief do you get attacked by their brethren.
SESSION::set('counter', 0); // Reset the counter to zero.
echo "A group of thieves is waiting for you. They seem to be angered by your attacks on their theiving brethren."
$group_attack= rand(200, 500)
if (!subtractHealth($username, $group_attack) { // If the den of theives killed the attacker.
echo "<p>The group of thieves have avenged their brotherhood and caused a bloody mess.</p>";
echo "<p>Go to the <a href=\"shrine.php\">shrine</a> to resurrect.</p>";
} else { // The den of thieves didn't accomplish their goal
$group_gold = rand(150, 300);
if ($group_attack > 450) {
echo "<p>You overpowered the swine, but the blow to the head they gave you before they ran made you lose some of your memories!</p>";
subtractKills($username, 1);
} else {
echo "<p>The thieves are injured!</p>";
echo "<p>The group of theives does $group_attack damage to you, but you rout them in the end!</p>";
echo "<p>You have gained $group_gold gold.</p> <p>You have found a firescroll on one of the thieves!</p>";
addGold($username, $group_gold);
addItem($username, 'Firescroll', $quantity = 1);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment