hide map for Character groups Quest Stations when there are no stations
This commit is contained in:
commit
df14dfafc3
4371 changed files with 1220224 additions and 0 deletions
41
questtypes/bossfight/html/edittask.tpl
Normal file
41
questtypes/bossfight/html/edittask.tpl
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<form method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><?=_('Boss-Fight')?></legend>
|
||||
<label><?=_('Boss name')?></label>
|
||||
<input type="text" name="bossname" value="<?=$fight['bossname']?>" /><br />
|
||||
<label><?=_('Boss image')?></label>
|
||||
<input type="file" name="bossimage" /><br />
|
||||
<label><?=_('Boss lives')?></label>
|
||||
<input type="number" name="lives_boss" value="<?=$fight['lives_boss']?>" /><br />
|
||||
<label><?=_('Character lives')?></label>
|
||||
<input type="number" name="lives_character" value="<?=$fight['lives_character']?>" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><?=_('Stages')?></legend>
|
||||
<?php renderStage($stages, $fight['lives_boss'], $fight['lives_character']); ?>
|
||||
</fieldset>
|
||||
<input type="submit" name="save" value="<?=_('save')?>" />
|
||||
</form>
|
||||
|
||||
<?php function renderStage($stage, $livesBoss, $livesCharacter, $level=0, $indices=array()) { ?>
|
||||
<div style="margin-left:<?=$level?>em">
|
||||
<h2><?=implode('.', $indices)?></h2>
|
||||
<?php if(!empty($stage['question'])) : ?>
|
||||
<p><?=$stage['question']?></p>
|
||||
<?php endif ?>
|
||||
<p><?=_('Character')?> <?=$livesCharacter?> vs. <?=$livesBoss?> <?=_('Boss')?></p>
|
||||
<p><?=$stage['text']?></p>
|
||||
<?php foreach($stage['childs'] as $index => &$childStage) : ?>
|
||||
<?php $childIndices = $indices; ?>
|
||||
<?php $childIndices[] = $index+1; ?>
|
||||
<?php renderStage($childStage, $livesBoss+$childStage['livedrain_boss'], $livesCharacter+$childStage['livedrain_character'], $level+1, $childIndices); ?>
|
||||
<?php endforeach ?>
|
||||
<?php if($livesBoss == 0 && $livesCharacter == 0) : ?>
|
||||
Bedie verloren
|
||||
<?php elseif($livesBoss == 0) : ?>
|
||||
Boss verloren, Character gewonnen
|
||||
<?php elseif($livesCharacter == 0) : ?>
|
||||
Boss gewonnen, Character verloren
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
54
questtypes/bossfight/html/quest.tpl
Normal file
54
questtypes/bossfight/html/quest.tpl
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<?php if(!is_null($fight)) : ?>
|
||||
<div class="cf">
|
||||
<section class="opponent">
|
||||
<p class="fwb"><?=$character['name']?></p>
|
||||
<p class="portrait"><img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']))?>" class="hero" /></p>
|
||||
<p>
|
||||
<?php if($lives['character'] > 0) : ?>
|
||||
<?php foreach(range(1,$lives['character']) as $i) : ?>
|
||||
<i class="fa fa-heart fa-fw"></i>
|
||||
<?php endforeach ?>
|
||||
<?php else : ?>
|
||||
<?=_('lost')?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</section>
|
||||
<section class="opponent">
|
||||
<p class="fwb"><?=$fight['bossname']?></p>
|
||||
<p class="portrait"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$fight['bossmedia']['url']))?>" class="boss" /></p>
|
||||
<p>
|
||||
<?php if($lives['boss'] > 0) : ?>
|
||||
<?php foreach(range(1,$lives['boss']) as $i) : ?>
|
||||
<i class="fa fa-heart fa-fw"></i>
|
||||
<?php endforeach ?>
|
||||
<?php else : ?>
|
||||
<b><?=_('lost')?></b>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if(!is_null($stage)) : ?>
|
||||
<p><?=\hhu\z\Utils::t($stage['text'])?></p>
|
||||
<form method="post" action="<?=$linker->link(null,0,false,null,true,'task')?>">
|
||||
<input type="hidden" name="stage" value="<?=$stage['id']?>" />
|
||||
<ul class="bossfight cf">
|
||||
<?php foreach($childStages as &$childStage) : ?>
|
||||
<li class="option">
|
||||
<p><i>
|
||||
<?php if(array_key_exists('answer', $childStage) && $childStage['answer']) : ?>→<?php endif ?>
|
||||
<?=\hhu\z\Utils::t($childStage['question'])?>
|
||||
</i></p>
|
||||
<p><input type="submit" name="submit_stages[<?=$childStage['id']?>]" value="<?=_('Choose')?>" /></p>
|
||||
</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>
|
||||
<?php endif ?>
|
||||
38
questtypes/bossfight/html/submission.tpl
Normal file
38
questtypes/bossfight/html/submission.tpl
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<div class="cf">
|
||||
<section class="opponent">
|
||||
<p class="portrait"><img src="<?=$linker->link(array('media','avatar',$seminary['url'],$character['charactertype_url'],$character['xplevel']))?>" class="hero" /></p>
|
||||
</section>
|
||||
<section class="opponent">
|
||||
<p class="portrait"><img src="<?=$linker->link(array('media','seminary',$seminary['url'],$fight['bossmedia']['url']))?>" class="boss" /></p>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<?php foreach($stages as &$stage) : ?>
|
||||
<p><?=$stage['question']?></p>
|
||||
<div class="cf">
|
||||
<section class="opponent">
|
||||
<p class="fwb"><?=$character['name']?></p>
|
||||
<p>
|
||||
<?php if($stage['lives']['character'] > 0) : ?>
|
||||
<?php foreach(range(1,$stage['lives']['character']) as $i) : ?>
|
||||
<i class="fa fa-heart fa-fw"></i>
|
||||
<?php endforeach ?>
|
||||
<?php else : ?>
|
||||
<?=_('lost')?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</section>
|
||||
<section class="opponent">
|
||||
<p class="fwb"><?=$fight['bossname']?></p>
|
||||
<p>
|
||||
<?php if($stage['lives']['boss'] > 0) : ?>
|
||||
<?php foreach(range(1,$stage['lives']['boss']) as $i) : ?>
|
||||
<i class="fa fa-heart fa-fw"></i>
|
||||
<?php endforeach ?>
|
||||
<?php else : ?>
|
||||
<b><?=_('lost')?></b>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
</section>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue