implement Questtype ?Boss-Fight?

This commit is contained in:
coderkun 2014-04-15 13:13:13 +02:00
commit cadce33434
5 changed files with 552 additions and 0 deletions

View file

@ -0,0 +1,58 @@
<table>
<tbody>
<tr>
<td>
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$character['avatar_url']))?>" />
</td>
<td>
<?php if(array_key_exists('bossmedia', $fight)) : ?>
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$fight['bossmedia']['url']))?>" />
<?php endif ?>
</td>
</tr>
<tr>
<td>
<?=$character['name']?>:
<?php if($lives['character'] > 0) : ?>
<?php foreach(range(1,$lives['character']) as $i) : ?>
<?php endforeach ?>
<?php else : ?>
<?=_('verloren')?>
<?php endif ?>
</td>
<td>
<?=$fight['bossname']?>:
<?php if($lives['boss'] > 0) : ?>
<?php foreach(range(1,$lives['boss']) as $i) : ?>
<?php endforeach ?>
<?php else : ?>
<?=_('verloren')?>
<?php endif ?>
</td>
</tr>
</tbody>
</table>
<p><?=\hhu\z\Utils::t($stage['text'])?></p>
<form method="post" action="#task">
<input type="hidden" name="stage" value="<?=$stage['id']?>" />
<ul>
<?php foreach($childStages as &$childStage) : ?>
<li>
<?php if(array_key_exists('answer', $childStage) && $childStage['answer']) : ?>
<?php endif ?>
<input type="submit" name="submit_stages[<?=$childStage['id']?>]" value="<?=$childStage['question']?>" />
</li>
<?php endforeach?>
<?php if($lives['character'] == 0 || $lives['boss'] == 0) : ?>
<li>
<input type="hidden" name="answers" value="" />
<input type="submit" name="submit" value="<?=_('solve')?>" />
</li>
<?php endif ?>
</ul>
</form>

View file

@ -0,0 +1,43 @@
<table>
<tbody>
<tr>
<td>
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$character['avatar_url']))?>" />
</td>
<td>
<?php if(array_key_exists('bossmedia', $fight)) : ?>
<img src="<?=$linker->link(array('media','seminary',$seminary['url'],$fight['bossmedia']['url']))?>" />
<?php endif ?>
</td>
</tr>
<?php foreach($stages as &$stage) : ?>
<tr>
<td colspan="2">
<?=$stage['question']?>
</td>
</tr>
<tr>
<td>
<?=$character['name']?>:
<?php if($stage['lives']['character'] > 0) : ?>
<?php foreach(range(1,$stage['lives']['character']) as $i) : ?>
<?php endforeach ?>
<?php else : ?>
<?=_('verloren')?>
<?php endif ?>
</td>
<td>
<?=$fight['bossname']?>:
<?php if($stage['lives']['boss'] > 0) : ?>
<?php foreach(range(1,$stage['lives']['boss']) as $i) : ?>
<?php endforeach ?>
<?php else : ?>
<?=_('verloren')?>
<?php endif ?>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>