예제 #1
0
 public function action_attack()
 {
     $character = $this->character;
     $battle = $character->battle;
     if (!Battle::can_fight($character) or !Battle::can_fight($battle)) {
         $this->request->redirect('battle/end');
     }
     Battle::fight($character, $battle);
     $this->request->redirect('battle');
 }
예제 #2
0
파일: War.php 프로젝트: aaemnnosttv/War.php
 public function fight()
 {
     // these are the "face down" cards
     $this->takePair();
     return parent::fight();
 }
예제 #3
-62
파일: battle.php 프로젝트: Xaoziq/EVOBOTS
<?php

$battle = new Battle();
$character1 = array();
$character1['name'] = 'Xaoziq';
$character1['level'] = 1;
$character1['attack'] = 10;
$character1['defense'] = 50;
$character1['hp'] = 100;
$character2 = array();
$character2['name'] = 'Evolutionary';
$character2['level'] = 1;
$character2['attack'] = 10;
$character2['defense'] = 50;
$character2['hp'] = 100;
?>
<div class="col-lg-9">
	<?php 
$battle->fight($character1, $character2);
?>
</div>