ORDERUS:
Health: 76
Strength: 72
Defence: 45
Speed: 50
Luck: 22
BEAST:
Health: 81
Strength: 65
Defence: 43
Speed: 56
Luck: 25
//
//
//$round = 1;
//while ( $this->orderus[ 'health' ] > 0 && $beast[ 'health' ] > 0 && $round <= 20 ) {
// $magicShield = 1;
// $rapidStrike = 1;
// $hit = 0;
// echo nl2br( "\nROUND " . $round . "\n" );
// if ( $orderus[ 'speed' ] == $beast[ 'speed' ] ) {
// if ( $orderus[ 'luck' ] > $beast[ 'luck' ] ) {
// echo nl2br( "ORDERUS attacks! \n" );
// $beast[ 'speed' ] = $orderus[ 'speed' ] + 1;
//
// if ( rand( 0, 100 ) <= $orderus[ 'chanceRapidStrike' ] ) {
// $rapidStrike = 2;
// echo nl2br( "ORDERUS is using Rapid Strike! \n" );
// }
// if ( rand( 0, 100 ) >= $beast[ 'luck' ] ) {
// $hit = 1;
// } else {
// echo nl2br( "Hit missed! \n" );
// }
//
// $damage = $hit * ( $orderus[ 'strength' ] - $beast[ 'defence' ] );
// $beast[ 'health' ] = $beast[ 'health' ] - $rapidStrike * $damage;
//
// echo nl2br( "\nBEAST: \n\t Damage: " . $damage . "\n\t Health: " . $beast[ 'health' ] . "\n" );
// } else {
// echo nl2br( "BEAST attacks! \n" );
// $orderus[ 'speed' ] = $beast[ 'speed' ] + 1;
//
// if ( rand( 0, 100 ) <= $orderus[ 'chanceMagicShield' ] ) {
// $magicShield = 2;
// echo nl2br( "ORDERUS is using Magic Shield! \n" );
// }
// if ( rand( 0, 100 ) >= $orderus[ 'luck' ] ) {
// $hit = 1;
// } else {
// echo nl2br( "Hit missed! \n" );
// }
//
// $damage = $hit * ( $beast[ 'strength' ] - $orderus[ 'defence' ] );
// $orderus[ 'health' ] = $orderus[ 'health' ] - $damage / $magicShield;
//
// echo nl2br( "\nORDERUS: \n\t Damage: " . $damage . "\n\t Health: " . $orderus[ 'health' ] . "\n" );
// }
// } else if ( $orderus[ 'speed' ] > $beast[ 'speed' ] ) {
// echo nl2br( "\nORDERUS attacks! \n" );
// $beast[ 'speed' ] = $orderus[ 'speed' ] + 1;
//
// if ( rand( 0, 100 ) <= $orderus[ 'chanceRapidStrike' ] ) {
// $rapidStrike = 2;
// echo nl2br( "ORDERUS is using Rapid Strike! \n" );
// }
// if ( rand( 0, 100 ) >= $beast[ 'luck' ] ) {
// $hit = 1;
// } else {
// echo nl2br( "Hit missed! \n" );
// }
//
// $damage = $hit * ( $orderus[ 'strength' ] - $beast[ 'defence' ] );
// $beast[ 'health' ] = $beast[ 'health' ] - $rapidStrike * $damage;
//
// echo nl2br( "\nBEAST: \n\t Damage: " . $damage . "\n\t Health: " . $beast[ 'health' ] . "\n" );
// } else if ( $orderus[ 'speed' ] < $beast[ 'speed' ] ) {
// echo nl2br( "\nBEAST attacks! \n" );
// $orderus[ 'speed' ] = $beast[ 'speed' ] + 1;
//
// if ( rand( 0, 100 ) <= $orderus[ 'chanceMagicShield' ] ) {
// $magicShield = 2;
// echo nl2br( "ORDERUS is using Magic Shield! \n" );
// }
// if ( rand( 0, 100 ) >= $orderus[ 'luck' ] ) {
// $hit = 1;
// } else {
// echo nl2br( "Hit missed! \n" );
// }
//
// $damage = $hit * ( $beast[ 'strength' ] - $orderus[ 'defence' ] );
// $orderus[ 'health' ] = $orderus[ 'health' ] - $damage / $magicShield;
//
// echo nl2br( "\nORDERUS: \n\t Damage: " . $damage . "\n\t Health: " . $orderus[ 'health' ] . "\n" );
// }
//
// if ( $orderus[ 'health' ] <= 0 ) echo nl2br( "Beast is the winner! \n" );
// if ( $beast[ 'health' ] <= 0 ) echo nl2br( "Orderus is the winner! \n" );
// if ( $round == 20 ) {
// if ( $orderus[ 'health' ] > $beast[ 'health' ] ) echo nl2br( "Orderus is the winner! \n" );
// else if ( $orderus[ 'health' ] < $beast[ 'health' ] ) echo nl2br( "Beast is the winner! \n" );
// else echo nl2br( 'Equality!!!' );
// }
//
// $round ++;
//
//$orderus = [
// 'health' => rand( 70, 100 ),
// 'strength' => rand( 70, 80 ),
// 'defence' => rand( 45, 55 ),
// 'speed' => rand( 40, 50 ),
// 'luck' => rand( 10, 30 ),
// 'chanceRapidStrike' => 10,
// 'chanceMagicShield' => 20
//];
//
//$beast = [
// 'health' => rand( 60, 90 ),
// 'strength' => rand( 60, 90 ),
// 'defence' => rand( 40, 60 ),
// 'speed' => rand( 40, 60 ),
// 'luck' => rand( 25, 40 )
//];
//
//echo nl2br( "ORDERUS: \n\t Health: " . $orderus[ 'health' ] . "\n\t Strength: " . $orderus[ 'strength' ] . "\n\t Defence: " . $orderus[ 'defence' ] . "\n\t Speed: " . $orderus[ 'speed' ] . "\n\t Luck: " . $orderus[ 'luck' ] . "\n\n" );
//echo nl2br( "BEAST: \n\t Health: " . $beast[ 'health' ] . "\n\t Strength: " . $beast[ 'strength' ] . "\n\t Defence: " . $beast[ 'defence' ] . "\n\t Speed: " . $beast[ 'speed' ] . "\n\t Luck: " . $beast[ 'luck' ] . "\n\n" );