From 489783a19a6414ac3cbfa6fee3ba89c6f76a9570 Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 03:46:28 +0100 Subject: [PATCH 01/33] OP commands for dificulty@ element@ and name@ --- lib/dragonraid.php | 72 +++++++++++++++++++++++++++++++++--- template/attack_sequence.tpl | 10 ++--- template/fight.tpl | 9 +++-- 3 files changed, 76 insertions(+), 15 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index b11b315..6e5d8c9 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -97,10 +97,32 @@ function __construct($_parsed_thread){ //boss status $this->BossIMG = "http://thumbs.4chan.org/b/thumb/".$this->OPost->tim."s.jpg"; - $boss_min_hp = 3000+self::roll($this->OPost->no)*$this->boss_hp_factor; - $this->BossHP_MAX = ($boss_min_hp < 16000 ? 16000 : $boss_min_hp); - $this->BossHP = $this->BossHP_MAX; + $this->setBossDificulty('easy'); $this->BossElement = self::getBossElement($this->OPost->no); + $this->BossName = "RandomBeast"; + + + /** + * OP COMMANDS + */ + $this->OPost->commands = self::parseCommandValues($this->OPost); + + //set OP options [dificulty@] + if($_dificulty = self::checkForCommand('dificulty@',$this->OPost)){ + $this->setBossDificulty($_dificulty); + } + + //set OP options [name@] + if($_name = self::checkForCommand('name@',$this->OPost)){ + $this->BossName = $_name; + } + + //set OP options [element@] + if($_element = self::checkForCommand('element@',$this->OPost)){ + if(in_array($_element,$this->available_elements)){ + $this->BossElement = $_element; + } + } } @@ -118,8 +140,8 @@ function play(){ $this->_cached_post_authors[$post->no] = $post->id; //ignore OP first post - if($post->no==$this->THREAD_ID){ - continue; + if($post->no==$this->THREAD_ID){ + continue; } //boss is already dead! @@ -129,6 +151,8 @@ function play(){ //get the current player class $post->class = self::getPlayerClass($post->id); + + //parse post commands $post->commands = self::parseCommandValues($post); //check and set nickname from command @@ -152,7 +176,6 @@ function play(){ //mandatory data (that might not be on the API item) $post->com = isset($post->com) ? $post->com : ""; - //$post->filename = isset($post->filename) ? $post->filename : ""; $post->tim = isset($post->tim) ? $post->tim : ""; // Default an element @@ -273,6 +296,43 @@ function isDeadPlayer($_id){ return in_array($_id, $this->deadPlayers); } + function setBossDificulty($dificulty){ + switch ($dificulty) { + case 'noob': + $boss_min_hp = self::roll($this->OPost->no)*$this->boss_hp_factor; + $this->BossHP_MAX = ($boss_min_hp < 6000 ? 6000 : $boss_min_hp); + $this->BossHP_MAX = ($boss_min_hp > 16000 ? 16000 : $boss_min_hp); + $this->BossHP = $this->BossHP_MAX; + $this->boss_heal_factor = 30; + break; + default: + case 'easy': + $boss_min_hp = self::roll($this->OPost->no)*$this->boss_hp_factor; + $this->BossHP_MAX = ($boss_min_hp < 16000 ? 16000 : $boss_min_hp); + $this->BossHP = $this->BossHP_MAX; + $this->boss_heal_factor = 30; + break; + case 'medium': + $boss_min_hp = self::roll($this->OPost->no)*$this->boss_hp_factor*1.5; + $this->BossHP_MAX = ($boss_min_hp < 22000 ? 22000 : $boss_min_hp); + $this->BossHP = $this->BossHP_MAX; + $this->boss_heal_factor = 40; + break; + case 'hard': + $boss_min_hp = self::roll($this->OPost->no)*$this->boss_hp_factor*2; + $this->BossHP_MAX = ($boss_min_hp < 27000 ? 27000 : $boss_min_hp); + $this->BossHP = $this->BossHP_MAX; + $this->boss_heal_factor = 50; + break; + case 'nigger': + $this->BossHP_MAX = 66666; + $this->BossHP = $this->BossHP_MAX; + $this->boss_heal_factor = 50; + break; + } + + } + function getBossElement($id) { $last_digit = substr($id, -1); diff --git a/template/attack_sequence.tpl b/template/attack_sequence.tpl index 7cd9405..9fd78fc 100644 --- a/template/attack_sequence.tpl +++ b/template/attack_sequence.tpl @@ -29,7 +29,7 @@ case 'miss': sprite('/miss.png'); - echo "rolls $_roll and misses the beast"; + echo "rolls $_roll and misses $BossName"; break; case 'damage': if($_bonus>0){ @@ -46,12 +46,12 @@ echo "with ".$_row['_pet_damage']." power,"; echo "
"; } - echo "rolls $_roll and damages the beast for ".($_damage+$_bonus)."(+$_bonus) HP"; + echo "rolls $_roll and damages $BossName for ".($_damage+$_bonus)."(+$_bonus) HP"; }elseif($_bonus<0){ sprite("/attack_down.png"); - echo "rolls $_roll and damages the beast for ".($_damage+$_bonus)." ($_bonus) HP"; + echo "rolls $_roll and damages $BossName for ".($_damage+$_bonus)." ($_bonus) HP"; }else{ - echo "rolls $_roll and damages the beast for $_damage HP"; + echo "rolls $_roll and damages $BossName for $_damage HP"; } break; case 'death': @@ -60,7 +60,7 @@ echo "dies by rolling $_roll"; }else{ sprite("/death.png"); - echo "dies by rolling $_roll. the beast heals for ".(-$_damage)." HP"; + echo "dies by rolling $_roll. $BossName heals for ".(-$_damage)." HP"; } break; case 'avenge': diff --git a/template/fight.tpl b/template/fight.tpl index 79aea94..a412226 100644 --- a/template/fight.tpl +++ b/template/fight.tpl @@ -1,7 +1,7 @@ BossHP/$this->BossHP_MAX * 100); - +$BossName = $this->BossName; ?> @@ -23,6 +23,7 @@ $boss_hp_percentage = floor($this->BossHP/$this->BossHP_MAX * 100);
+

@@ -47,7 +48,7 @@ $boss_hp_percentage = floor($this->BossHP/$this->BossHP_MAX * 100);
- THE BEAST HAS BEEN SLAIN! + THE HAS BEEN SLAIN!
@@ -57,7 +58,7 @@ $boss_hp_percentage = floor($this->BossHP/$this->BossHP_MAX * 100);
- THE BEAST HAS ENRAGED! Every roll under min_roll; ?> will result in death!! + HAS ENRAGED! Every roll under min_roll; ?> will result in death!!
@@ -159,7 +160,7 @@ $boss_hp_percentage = floor($this->BossHP/$this->BossHP_MAX * 100); echo ""; echo ""; echo "
"; - echo "THE BEAST HAS ENRAGED!"; + echo "$BossName HAS ENRAGED!"; echo "
Every roll under $this->min_roll will result in death!!"; echo "
"; echo ""; From dee27a0402f75faf0843e180246e5bc19f525d6e Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 03:59:26 +0100 Subject: [PATCH 02/33] readme update for new commands --- README.md | 72 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 60 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1d28bd1..645e6b5 100644 --- a/README.md +++ b/README.md @@ -24,15 +24,47 @@ If you have complains about being banned for posting too many dragon threads in Please don`t spam with dragon threads or you will end up ruining it for other people. -Thread Template: -================ +How to start a dragonchan thread: +================================ _Allways check this page for the correct template before posting. rules will be updated as the game evolves_ + +__OP options: dificulty command__ + +`dificulty@noob` - very easy boss +`dificulty@easy` - default +`dificulty@medium` - challaging boss +`dificulty@hard` - almost impossible boss + +__OP options: name command__ +this will set the boss name (no spaces, no numbers): + +`name@[desired name]` + + +__OP options: element command__ +this will set the boss element: + +`name@fire` +`name@ice` +`name@eath` +`name@electric` +`name@water` + + + +OP POST TEMPALTE: +================ ``` ITT: /b/ dragon slayer raid! Rules: This huge motherfucking dragon appears out of nowhere. -This thread last 2 digits x300 define its HP (plus a flat 3000) +Read the full rules here: http://dragonslayer.eu01.aws.af.cm + +Heres some info about this boss: +name@Dragon +dificulty@easy +element@random If your ID starts with a number you are a HEALER. If your ID starts with a vowel you are a BARD. @@ -44,26 +76,42 @@ Otherwise you are a KNIGHT Your last 2 digits represent the damage you do If you roll under 11 you DIE! (your posts will no longer do damage) +``` -HEALERS revive fallen soldiers by targeting them and rolling an EVEN number -BARDS are here to motive troops! each time they post an image the next 3 posts will do bonus damage! -KNIGHTS can critical hit by rolling 5 or 0 -KNIGHTS avenge fallen soldiers by targeting them and rolling an EVEN number. Avenging does more damage for the glory of the fallen mate. + +FIRST REPLY: +================ +``` +http://dragonslayer.eu01.aws.af.cm/[place thread_id here] + + +HEALERS revive fallen soldiers +BARDS can boost the party damage by posting images +KNIGHTS can critical hit and avenge! PALADINS can avenge AND revive! -WARLOCKS can summon minions by posting an image. The last 2 digits of the image filename will be added to his damage. if his roll last digit matches his minion last digit he BURSTS massive damage. -DEATH KNIGHTS can continue attacking after they die. they will do x3 damage when dead but only 2/3 when alive. -DRAGONBORN can avenge and revive when alive, and will transform into a Death knight after death. this is the ultimate class! +WARLOCKS can summon minions by posting an image. +DEATH KNIGHTS can continue attacking after they die. +DRAGONBORN can avenge and revive when alive, and attack after death. + you can be avenged/revived 6 times max If you roll 00 or 69 you REVIVE everyone! their damage will count again! The boss will enrage bellow 20% HP, the minimum roll will be 22. however, he will no longer heal himself - -I have a webpage to track things, I will post a link to it here. ``` + + + + + Changelog ========= +__v1.6.5- 27-04-2013__ + - Player commands + - OP commands + - sprite fix + __v1.6- 27-04-2013__ - New Class: 'Dragonborn' - Code Cleanup and new sprites From 48fde920a6c8b562f79a395ef875c0f045338c9f Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 05:03:26 +0200 Subject: [PATCH 03/33] Update README.md --- README.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 645e6b5..d788cff 100644 --- a/README.md +++ b/README.md @@ -28,32 +28,35 @@ How to start a dragonchan thread: ================================ _Allways check this page for the correct template before posting. rules will be updated as the game evolves_ -__OP options: dificulty command__ +__OP options: dificulty@ command__ -`dificulty@noob` - very easy boss -`dificulty@easy` - default -`dificulty@medium` - challaging boss -`dificulty@hard` - almost impossible boss +- `dificulty@noob` - very easy boss +- `dificulty@easy` - default +- `dificulty@medium` - challenging boss +- `dificulty@hard` - almost impossible boss + +__OP options: name@ command__ -__OP options: name command__ this will set the boss name (no spaces, no numbers): `name@[desired name]` __OP options: element command__ + this will set the boss element: -`name@fire` -`name@ice` -`name@eath` -`name@electric` -`name@water` +`element@fire` +`element@ice` +`element@eath` +`element@electric` +`element@water` -OP POST TEMPALTE: +POST TEMPALTE: ================ +_use the commands described above to configure the boss_ ``` ITT: /b/ dragon slayer raid! @@ -79,8 +82,9 @@ If you roll under 11 you DIE! (your posts will no longer do damage) ``` -FIRST REPLY: +FIRST REPLY TEMPLATE: ================ +_Dont forget to copy/paste the thread ID into the url_ ``` http://dragonslayer.eu01.aws.af.cm/[place thread_id here] From becb3c393d04e9f73ab7df483e453d0693b73569 Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 04:04:09 +0100 Subject: [PATCH 04/33] deploying version 1.6.5 --- lib/dragonraid.php | 2 +- template/info.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index 6e5d8c9..e93d585 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -15,7 +15,7 @@ * Chan Boss Raid main class */ Class DragonRaid{ - var $_version = "1.6"; + var $_version = "1.6.5"; var $THREAD_ID; var $THREAD; diff --git a/template/info.tpl b/template/info.tpl index 177e18d..29d1bc6 100644 --- a/template/info.tpl +++ b/template/info.tpl @@ -10,7 +10,7 @@ Fork me on GitHub
-

Dragonchan version 1.6

+

Dragonchan version 1.6.5


From 871758c3ebd42baf9690d39469fb72134b172a07 Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 04:18:04 +0100 Subject: [PATCH 05/33] CSS adjustments for readability --- lib/dragonraid.php | 2 +- site.css | 14 +++++++------- template/fight.tpl | 8 ++++++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index e93d585..bbf4f56 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -646,7 +646,7 @@ function getNickname($user_id){ return $this->_set_nicknames[$user_id]." ($user_id)"; //return "".$this->_set_nicknames[$user_id].""; }else{ - return $user_id; + return "($user_id)"; } } diff --git a/site.css b/site.css index 1d445be..f299682 100644 --- a/site.css +++ b/site.css @@ -32,15 +32,15 @@ ul.rules{ font-size: .9em; } .hero{ background-color: #EEE; padding:10px; border:2px solid #FEFEFE; border-radius: 10px; } .ink-row .praise{margin: 1.2%; padding: .3%; border:1px solid #EEE; background: #fff; min-height: 100px;} .ink-row .praise h4{margin-bottom:1em;} -.ink-label small{ font-size:10px; color:#DDD; } /*classes*/ -.ink-label.class-K{ background-color: #C79C6E; color: #FFF; } -.ink-label.class-H{ background-color: #ABD473; color: #FFF; } -.ink-label.class-P{ background-color: #FCD349; color: #FFF; } -.ink-label.class-B{ background-color: #69CCF0; color: #FFF; } -.ink-label.class-DK{ background-color: #666666; color: #FFF; } -.ink-label.class-W{ background-color: #9482C9; color: #FFF; } +.ink-label.class-K{ background-color: #C79C6E; color: #222; } +.ink-label.class-H{ background-color: #ABD473; color: #222; } +.ink-label.class-P{ background-color: #FCD349; color: #222; } +.ink-label.class-B{ background-color: #69CCF0; color: #222; } +.ink-label.class-DK{ background-color: #666666; color: #222; } +.ink-label.class-W{ background-color: #9482C9; color: #222; } .ink-label.class-DVK{ background-color: #000000; color: #FFF; } +.ink-label small{ font-size:10px; color:#fff; } /*elements*/ .e_normal{ color:#666; background-color: #CCC;} .e_water{ color:#06e; background-color: #CCC;} diff --git a/template/fight.tpl b/template/fight.tpl index a412226..e759efe 100644 --- a/template/fight.tpl +++ b/template/fight.tpl @@ -107,8 +107,12 @@ $BossName = $this->BossName; WINNER){ $WINNER_praises = $this->getPostReplies($this->WINNER->no); - $WINNER_text = html_entity_decode(strip_tags($this->WINNER->com)); + $WINNER_text = $this->WINNER->com; + $WINNER_text = str_replace("
",' ',$WINNER_text); + $WINNER_text = str_replace("
",' ',$WINNER_text); + $WINNER_text = html_entity_decode(strip_tags($WINNER_text)); $WINNER_text = preg_replace('/>>(\d+){9}/i','',$WINNER_text); + $WINNER_class = $this->WINNER->class; echo "

"; echo "WINRAR!!! Hail the new monster slayer!"; @@ -117,7 +121,7 @@ $BossName = $this->BossName; echo " >>".$this->WINNER->no; echo ''; echo "  "; - echo "

$WINNER_text   - "; + echo "

$WINNER_text   - "; echo $this->getNickname($this->WINNER->id); echo ""; echo "

"; From 3858a9b0526a126b70cbfb984b630d3fdccbf036 Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 05:23:57 +0200 Subject: [PATCH 06/33] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d788cff..f49d2ad 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,12 @@ How to start a dragonchan thread: ================================ _Allways check this page for the correct template before posting. rules will be updated as the game evolves_ -__OP options: dificulty@ command__ +__OP options: difficulty@ command__ -- `dificulty@noob` - very easy boss -- `dificulty@easy` - default -- `dificulty@medium` - challenging boss -- `dificulty@hard` - almost impossible boss +- `difficulty@noob` - very easy boss +- `difficulty@easy` - default +- `difficulty@medium` - challenging boss +- `difficulty@hard` - almost impossible boss __OP options: name@ command__ @@ -42,7 +42,7 @@ this will set the boss name (no spaces, no numbers): `name@[desired name]` -__OP options: element command__ +__OP options: element@ command__ this will set the boss element: From 57415058ae92963f668bbf36ea728173ce9c891b Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 04:24:58 +0100 Subject: [PATCH 07/33] ffffffff --- lib/dragonraid.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index bbf4f56..bcff1cf 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -97,7 +97,7 @@ function __construct($_parsed_thread){ //boss status $this->BossIMG = "http://thumbs.4chan.org/b/thumb/".$this->OPost->tim."s.jpg"; - $this->setBossDificulty('easy'); + $this->setBossDifficulty('easy'); $this->BossElement = self::getBossElement($this->OPost->no); $this->BossName = "RandomBeast"; @@ -107,9 +107,9 @@ function __construct($_parsed_thread){ */ $this->OPost->commands = self::parseCommandValues($this->OPost); - //set OP options [dificulty@] - if($_dificulty = self::checkForCommand('dificulty@',$this->OPost)){ - $this->setBossDificulty($_dificulty); + //set OP options [difficulty@] + if($_difficulty = self::checkForCommand('difficulty@',$this->OPost)){ + $this->setBossDifficulty($_difficulty); } //set OP options [name@] @@ -296,8 +296,8 @@ function isDeadPlayer($_id){ return in_array($_id, $this->deadPlayers); } - function setBossDificulty($dificulty){ - switch ($dificulty) { + function setBossDifficulty($difficulty){ + switch ($difficulty) { case 'noob': $boss_min_hp = self::roll($this->OPost->no)*$this->boss_hp_factor; $this->BossHP_MAX = ($boss_min_hp < 6000 ? 6000 : $boss_min_hp); From c027868ea4742f730251e23be182d7569c7b3de0 Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 04:56:36 +0100 Subject: [PATCH 08/33] boss was too hard with that HP regen --- lib/dragonraid.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index bcff1cf..c196d90 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -310,24 +310,24 @@ function setBossDifficulty($difficulty){ $boss_min_hp = self::roll($this->OPost->no)*$this->boss_hp_factor; $this->BossHP_MAX = ($boss_min_hp < 16000 ? 16000 : $boss_min_hp); $this->BossHP = $this->BossHP_MAX; - $this->boss_heal_factor = 30; + $this->boss_heal_factor = 33; break; case 'medium': $boss_min_hp = self::roll($this->OPost->no)*$this->boss_hp_factor*1.5; $this->BossHP_MAX = ($boss_min_hp < 22000 ? 22000 : $boss_min_hp); $this->BossHP = $this->BossHP_MAX; - $this->boss_heal_factor = 40; + $this->boss_heal_factor = 35; break; case 'hard': $boss_min_hp = self::roll($this->OPost->no)*$this->boss_hp_factor*2; $this->BossHP_MAX = ($boss_min_hp < 27000 ? 27000 : $boss_min_hp); $this->BossHP = $this->BossHP_MAX; - $this->boss_heal_factor = 50; + $this->boss_heal_factor = 38; break; case 'nigger': $this->BossHP_MAX = 66666; $this->BossHP = $this->BossHP_MAX; - $this->boss_heal_factor = 50; + $this->boss_heal_factor = 20; break; } From 92adc8d1cf7a62201bce95451beb9b5115c4a7c6 Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 16:50:20 +0200 Subject: [PATCH 09/33] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f49d2ad..7a88dac 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ this will set the boss element: `element@fire` `element@ice` -`element@eath` +`element@earth` `element@electric` `element@water` From 26c2a0bc3c4702ab340b272fc5ab8e941541f93c Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 17:08:10 +0100 Subject: [PATCH 10/33] info page for commands --- README.md | 2 +- site.css | 21 ++++++++++++++++++- template/info.tpl | 15 ++++++++++---- template/tutorial.tpl | 48 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7a88dac..8c698e4 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ The boss will enrage bellow 20% HP, the minimum roll will be 22. however, he wil Changelog ========= -__v1.6.5- 27-04-2013__ +__v1.6.5- 30-04-2013__ - Player commands - OP commands - sprite fix diff --git a/site.css b/site.css index f299682..6c20833 100644 --- a/site.css +++ b/site.css @@ -54,10 +54,29 @@ ul.rules{ font-size: .9em; } .boss-element {position: absolute; right:0; top:28px; font-size: 12px; font-family: arial; text-transform: uppercase; line-height: 22px; height: 22px; } .boss-element img {float:left; margin-right:5px;} - +.command{ font-family: Ubuntu_monospaced, serif; } ul.menu ul{ box-shadow:none; } .ink-navigation ul.menu li.active li a{ background-color:#FFF !important; +} +.left-pad b, +.left-pad p, +.left-pad ul{ + padding-left: 50px; +} + +#t_commands h3{ + + color:#900; +} +#t_commands ul pre{ + color:#090; + margin:1px; + padding:1px; +} +#t_commands ul li{ + padding:1px; + margin-left:40px; } \ No newline at end of file diff --git a/template/info.tpl b/template/info.tpl index 29d1bc6..817c114 100644 --- a/template/info.tpl +++ b/template/info.tpl @@ -10,14 +10,14 @@ Fork me on GitHub
-

Dragonchan version 1.6.5

+

Dragonchan version 1.6.5


-
+

Open Source

Github Project
https://github.com/entomb/dragonchan @@ -43,19 +43,26 @@

-
+

Changelog

+

v1.6.5- 30-04-2013

+
    +
  • Player commands
  • +
  • OP commands
  • +
  • sprite fix
  • +

v1.6- 27-04-2013

  • New Class: 'Dragonborn'
  • diff --git a/template/tutorial.tpl b/template/tutorial.tpl index 4934983..af08d49 100644 --- a/template/tutorial.tpl +++ b/template/tutorial.tpl @@ -25,6 +25,7 @@
  • Elements
  • Special Rolls
  • +
  • Commands
@@ -443,6 +444,9 @@

Special Rolls

Some rolls have special effects.

+

Miss!

+

Some rolls will miss regardless of the roll damage. This is calculated randomly (around 4% chance).

+

Rolling 000 trips, 0000 Quads, 00000 Quints, etc

Rolls are calculated in a way that they allways return a >0 number, this means that if your last 2 digits are "00" the script will look for your last 3 digits. if you last 3 digits are still "000", the script will look for your last 4 digits. this will go on until a >1 digit is found.

If you roll a number enting in more than two zeros (000,0000,0000,00000) your roll will give a great amouth of damage.

@@ -458,6 +462,50 @@
+

From 7e2b9567b57de79f278c162c3fc2ce0b3646821d Mon Sep 17 00:00:00 2001 From: Jonathan Tavares Date: Tue, 30 Apr 2013 19:01:22 +0100 Subject: [PATCH 11/33] bug cleanup --- lib/dragonraid.php | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index c196d90..be5f131 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -39,7 +39,7 @@ var $_cached_post_authors = array(); var $_set_nicknames = array(); - var $available_characters = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",'0','1','2','3','4','5','6','7','8','9','+','/'); + protected static $available_characters = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",'0','1','2','3','4','5','6','7','8','9','+','/'); @@ -83,6 +83,7 @@ 'ice' => 'Frost Golem', ); + var $_miss_hits = array('2','31','51'); /** * Init functions @@ -140,7 +141,7 @@ function play(){ $this->_cached_post_authors[$post->no] = $post->id; //ignore OP first post - if($post->no==$this->THREAD_ID){ + if($post->no==$this->THREAD_ID){ continue; } @@ -216,8 +217,8 @@ function play(){ continue; } - - if( (int)substr($post->time, -2) < 4) { + //miss hit! + if(in_array(self::roll($post->time),$this->_miss_hits)){ $action = 'miss'; $post->action = $action; $this->log($action,$post); @@ -662,7 +663,6 @@ function log($action,$post){ 'link' => $post->link, 'post' => $post->no, 'id' => $post->id, - 'color' => self::getPostColor($post->id), 'sprite' => self::getPlayerSprite($post), 'weapon' => self::getPlayerWeapon($post), 'chosen_element' => $post->chosen_element, @@ -961,9 +961,7 @@ static function getPlayerSprite($post){ $post_id = $post->id; // 64 variations - /* @@TODO: This needs to be instantiated into the Dragonraid - class as a static properly instead of being redundant */ - $range = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",'0','1','2','3','4','5','6','7','8','9','+','/'); + $range = self::$available_characters; // Knight @@ -1020,7 +1018,7 @@ static function getPlayerWeapon($post){ $post_id = $post->id; // 64 variations - $range = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z",'0','1','2','3','4','5','6','7','8','9','+','/'); + $range = self::$available_characters; // Knight if($class == "K"){ @@ -1080,7 +1078,11 @@ static function isCriticalHit($num){ } } - + /** + * Parses a post to check for command calls + * @param object $post the full post object + * @return array full command list + */ static function parseCommandValues($post){ if(!isset($post->com)){ return array(); @@ -1107,6 +1109,12 @@ static function parseCommandValues($post){ } + /** + * Checks if a post is calling a set command and returns the command value + * @param string $command 'comand@' to check + * @param object $post the full post object + * @return false|string returns the command value or false on not-found + */ static function checkForCommand($command,$post){ if(isset($post->commands[$command])){ @@ -1179,7 +1187,7 @@ function getPostReplies($post_id){ $targets = $this->getTargetPosts($post->com); $targets = array_keys($targets); - $post->class = self::getPlayerClass($post->id); + $post->class = self::getPlayerClass($post->id); $post->weapon = self::getPlayerWeapon($post); $post->sprite = self::getPlayerSprite($post); @@ -1194,16 +1202,6 @@ function getPostReplies($post_id){ return $replies; } - static function getPostColor($id){ - $md5 = md5($id); - $r = substr($md5, 0,2); - $g = substr($md5, 5,2); - $b = substr($md5, 10,2); - - return "#".$r.$g.$b; - } - - } From d4e19b44c2a16352b6c4b25e95438339654a7570 Mon Sep 17 00:00:00 2001 From: tselaty Date: Tue, 30 Apr 2013 18:28:56 -0500 Subject: [PATCH 12/33] Added some sprites --- images/sprites/rpg/.DS_Store | Bin 104452 -> 104452 bytes images/sprites/rpg/armor/.DS_Store | Bin 67588 -> 67588 bytes images/sprites/rpg/armor/DKV/.DS_Store | Bin 0 -> 6148 bytes images/sprites/rpg/armor/DKV/DKV_1.png | Bin 0 -> 379 bytes images/sprites/rpg/armor/DKV/DKV_10.png | Bin 0 -> 400 bytes images/sprites/rpg/armor/DKV/DKV_11.png | Bin 0 -> 393 bytes images/sprites/rpg/armor/DKV/DKV_12.png | Bin 0 -> 650 bytes images/sprites/rpg/armor/DKV/DKV_2.png | Bin 0 -> 360 bytes images/sprites/rpg/armor/DKV/DKV_3.png | Bin 0 -> 375 bytes images/sprites/rpg/armor/DKV/DKV_4.png | Bin 0 -> 395 bytes images/sprites/rpg/armor/DKV/DKV_5.png | Bin 0 -> 389 bytes images/sprites/rpg/armor/DKV/DKV_6.png | Bin 0 -> 395 bytes images/sprites/rpg/armor/DKV/DKV_7.png | Bin 0 -> 397 bytes images/sprites/rpg/armor/DKV/DKV_8.png | Bin 0 -> 378 bytes images/sprites/rpg/armor/DKV/DKV_9.png | Bin 0 -> 400 bytes images/sprites/rpg/armor/unused/.DS_Store | Bin 43012 -> 43012 bytes 16 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 images/sprites/rpg/armor/DKV/.DS_Store create mode 100644 images/sprites/rpg/armor/DKV/DKV_1.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_10.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_11.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_12.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_2.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_3.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_4.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_5.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_6.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_7.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_8.png create mode 100644 images/sprites/rpg/armor/DKV/DKV_9.png diff --git a/images/sprites/rpg/.DS_Store b/images/sprites/rpg/.DS_Store index 1e48ce5bef7a9859e205aa3d853d271aef49cfad..3303153535429f3a49a85b3966cb55d6dd98fe1d 100644 GIT binary patch delta 93 zcmZqKz}B*XZNpJ6L9Fvef1e53&4YS`F8V0imAif8a^%p?1 T7AW}>k$@3{4?MRIJOTAv)EO46 diff --git a/images/sprites/rpg/armor/.DS_Store b/images/sprites/rpg/armor/.DS_Store index 501cb768722d0361c2c2641f3f81f92f16090ea5..82d23a0cbf28ebd745ac1cffbdfa1e8970b809ba 100644 GIT binary patch delta 90 zcmZpfz|t~-WrK=1MixM}xuIcgEhh&Dr$9T0sFI$I uM@V8-bxm#EVuVT!|wB!Hee5L-)cO>=MHghTbdJX`%iygrL delta 46 zcmV+}0MY-1kOYK~1h6C*lfx!w0yHp_EGJ2m)fYmu@ESY;0Bb5PgdjsEMJpyk8(v*q;O|#h92FJ48Sr0VKzfSl&|3bk2R-H(tH+f7 zBl-`uH9|qJiN+5xWqrxW8RNui5o?Z7&{lf8V0%KZ0jOdNfTYs$n(N}-Ld2Qum z?(P~leERX09^=axYYGN}frBx?oGsEgH;ghE2nK?IEd%m>$f$z3V`ZqH4i8o5%Fx1*bY_m@Gbg{HB%Pi1Ox=-k!zhD+ zU|^Sl6Kggl|KI(7|KAOYRxl6@{3`}hz5Cqla7&(B_ckZFHlw~#MZ~W%+=j5CshGZ! ciZ7`uv}aNw=8lyiEtL2XP#U5L1`f)=H}ifwApigX literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/armor/DKV/DKV_1.png b/images/sprites/rpg/armor/DKV/DKV_1.png new file mode 100644 index 0000000000000000000000000000000000000000..0740434bf4fb566dd09080374a65afbb00d16b1e GIT binary patch literal 379 zcmV->0fhdEP)|`Pr_j z;M*?dEyCO0Kl($`Wx47>Zl_)Qx*odt2~OZ_I{79Mf<6s}{{)0Ow41sPgYc{^kxC@H zpM+u@g6b2f0};=AlK|CYx8kwc_rbb390WBEMjJp(t}sNRmQeKwPz(kLp~?VNSk?mW zG?g-u$>`@K>gQlJl%NPE5<1EPCK8H44ppUY!Jt}}iq<1T)kVt>ef9E+ik_2FfS$Op ztaRsDI;tFh^y`Y$qTb2UP0|CP9s{ODe?G1|Uz1}R0o5PBObF1L9rV#}CiRLSs8b-9 zp1rYDrS2;G=%)fl7ynTGG06`~Sf@V7;nC6}5n(yGy3!5rn_A@_yzH?nJd(wMf4!Wa Z?+rnxtR}Y43{n69002ovPDHLkV1gj?s%!uN literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/armor/DKV/DKV_10.png b/images/sprites/rpg/armor/DKV/DKV_10.png new file mode 100644 index 0000000000000000000000000000000000000000..0134f1c2baef7e3851fa76d55a7a1a0e4422431e GIT binary patch literal 400 zcmV;B0dM|^P)SX+IUx&hX+mfN8 z5Xsnp!=PA)Q1t_JP}$?@=Q08dA_YTYX2M-Nt4lwbCB zuvcYz+Z2bXoA{=ct^BSdS*;V4;}`P^bhX-saI^T3_yU9;14gFb-d?@0!!@mdJ_a~F zCSDDBcHYPIGKF5La;OVHEq(XJ3aaT;eXf@u*3hL`nt$d$OByap<iIN5v857 uy44HM;N70O`DfQ|@h7=l_^*G?{`~^v^tu5D<`AF&0000b;@5JhR}5GX}1kknB65QvhBnj%t48jisQXlZkih^vGi_(%_Zk7vCOmPYojX5Rjp zon4Pc$+K#jt1OP={NP7H)8(NBneWfn?dk7n|AGS?zkNJ{fN0Lm;e&y*#rmO6<4Nn%wgMp$Dl@YA5fLh#PvW{Aya`H6g zERf8V3F@%k60p-KC6HjvvxwKT*bOzPj7)$IDgl8&mgmpTWMdhd-usbwP4c8cn1H@t&; nYsy9xk6q;_S#^Br&v}1txVP|9Turm@00000NkvXXu0mjf&Jn-& literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/armor/DKV/DKV_12.png b/images/sprites/rpg/armor/DKV/DKV_12.png new file mode 100644 index 0000000000000000000000000000000000000000..5e90a940a03ff448dcdf22bdef2879ac24946554 GIT binary patch literal 650 zcmV;50(Jd~P)D}H8~_*DII+r75! zI|uH)_;F``bM{$h?RC#Rb1(ROE>|HQC(t@?)z5vQsb{g!6f*k#6P1qlZ7vk9f&Si* zG-(Jl6Epnmz=fye4~NK?j?w71ip)F4Q?6jG)Yxl(ED%Eo5ij-Q|^$nDFJ_v0b;4tyjbkHjeg$$j0mDU`%ea;VL)0V*?00Nl}%9p(&V; zaUgc6z9@$Q^gBYsEWT&cHEsqsICPlJ76$>Ws|TT21FDDTJ&xeR?_KJho0Ks)mZaGF zijC@D|26~!LsK2NhL(BZ4x2FEcE6d7)Y+)05^v)93m+SqED*FqNb9>XLvOKsV3L z^y+B(?7-T=HVsbYWz;&eS`^$K&FpdY=`J#FmT2%{ k6X^9Pd8YAF|D1fC09f$6dJmx%5dZ)H07*qoM6N<$f=Q}BegFUf literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/armor/DKV/DKV_2.png b/images/sprites/rpg/armor/DKV/DKV_2.png new file mode 100644 index 0000000000000000000000000000000000000000..ae73193d2fb54372eaf688f24feafa217392f748 GIT binary patch literal 360 zcmV-u0hj)XP)#^lmO0GY-p-XRI=}`TT7+P4Mly zZa{e3`)7Yhy0+U1MlPe67s3lZA0u+M*LZ~u86;`x>J58lb zWHS0WiTatXh8h&XL_%j-z(hhZ$f2s#Ey${6sc1biR9&?E&{r?7sOUK<1?Y(j%Sv~i zrK8I6N58H}Et;Gx-6TB#>M>wi^nKrtz9z>s0;)fLnGm2goAuFeCiRLSs8b-9Uc9kX zrS2;G=%)f_7k{q)nB)f~tWzK4@Mvj~h_IYoUG0YVO>IgKUh&vf9?9y!zh2JI_XcH{ VuRq#f>+Jvl002ovPDHLkV1nLurcwX^ literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/armor/DKV/DKV_4.png b/images/sprites/rpg/armor/DKV/DKV_4.png new file mode 100644 index 0000000000000000000000000000000000000000..1e86e666cdd129c94c3ed70a08487371378eaef6 GIT binary patch literal 395 zcmV;60d)R}P)b>!3`KK*EFC;FYr7Q4&^hRkA?Q}1opXasxk2ubsdJCh1LQhMzJX_aQA-~d+-%RUH*=G+`U8~FCp_3AX< zy>_VqpDas+DnP;db^|Iu8R`pY1j;Ty9|aI23opfK|1<^zMIkC9SYrXTxWi$q~gH4hNAlwowTe3SeDc#Q?~rayi?4|Oe$X$EAh?|7L2 z@Sd&KG2TpGE0jx}14(`I#&XrZtIR2V_whr~Z2nsR5fl$f+NaSe!n4#e5otR`b*&rT p!IL#*BdW))@sn&i{_D?qe{KNZr`pG_SXKZ4002ovPDHLkV1nA1v;qJC literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/armor/DKV/DKV_5.png b/images/sprites/rpg/armor/DKV/DKV_5.png new file mode 100644 index 0000000000000000000000000000000000000000..b21ae9ced7e4902f321430c0fb9e55fe2f0a48d5 GIT binary patch literal 389 zcmV;00eb$4P)e%t$jTu!6nab1?t2~OZ--2WyKf<6s}cLG8k{x_>Q2v6D) zsYJ5-Nhro4sJ;SqAmVkORe&wO4cqaPC>)X&;#h@e!%U?QQdEMOv`801h@>K4?hWvOUAGE`l({Loh~ zuc+ubDFx_>3(HD(o~5J8@kPI`NGkf!IZgRB>s*or_c%APabkq)M5}Te$a99!1e7^n|a|QB)$}08!vQ{`)*q zn@#e3oX?#ij^p>$kCJZBFB8b)?Y-;1zQ_0z9N_DATatk2n}@?!124OMQK#|e(>@L0 zi?&3l5|pfW51^W-K>Z9Ffd%?=odF4|a4Q~%;}i@Og{X{RjRn-=4pYq30@WlhQuW literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/armor/DKV/DKV_7.png b/images/sprites/rpg/armor/DKV/DKV_7.png new file mode 100644 index 0000000000000000000000000000000000000000..0f9492a4fa02bca5291e7b567e0905e77195d008 GIT binary patch literal 397 zcmV;80doF{P)(nee=M=|~@KkIuu>or&!$!qPr{quKr zz1bws>*3HT;y8X^{V3`DazBAwKc2hp^fktx-~b70RW~ft0>@W4UVI)e+E_?{g-HqSgGh{v#HQ8N5xDqavX00000NkvXXu0mjfvrM&s literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/armor/DKV/DKV_8.png b/images/sprites/rpg/armor/DKV/DKV_8.png new file mode 100644 index 0000000000000000000000000000000000000000..531153e25ee4205d2574d9367fe4bab6f3f372ef GIT binary patch literal 378 zcmV-=0fqjFP)PSbGVt;E7g8m}PeIldLX$mW2G5$>b+# zn&8{6CN09--aq(5(s4iPL2j2>`@FBa_z6znVm|&R5rRGqh5rPEI<$A2I0!G=5~)P8 z`$;IqA*eoqIuP-CEEAx5>{eV)2G-5tAgFOL+5lp5g&`8PgsMk?VlY4mRR*ZSiWYFE zsg#LKMn5M}KeN?PgCdwn=pYN2NGJw5RF%2~S+y(`tw)Bcig5#`Jtw6AJ#k@K z>CUrsR5||W*A=Nny_2Pzqz6Df226|oe3*8=CdV`asy}|25TG@i_0ex8^@<>s7b&K7UM37qd2DTxq_X()U$@ZWg2&x}IJrHqu{tkc)t3s@3ZtEOOC>2tr2jd+;EUvH=UM-=Rl$F^{ z1_+_bQrQ9kj&Om<@m)ofu^>%Av;;RNqPX(W5BfOH`lHCIyj~gknaiX zE)%Opdba4JznRo4Du+4+vh>j#OI7Qxat!5XbL3D|o4?e5Od1@Ns89VQ506TVM1<|+ u)zxlz1&?~ljVKz6j4TWc4BDGLn8X<;Cl^UhHjrYOe6OBoatE{M1#Lxr^Cq@-6}4&GG`9_&0MaIJ1GYD@<-M5TBf>HWS2A0&`^5!5l>} z=OToo4Cb_IfMry`97|0wM-9w*3*o4OISaMGGU{MXs5Y3R2j+0`uY1z0y9XyInw%sS&gKLFciS=#^r delta 225 zcmZpChLgt yPL5{Qo&2iacyoBeWd6xE{eqL{GOKTX(J#cx#Nal$pjCEraO)eU&8##2^8)~f30Lm` From 390108a264d4212dcc3ae68e4fa7c22d462d98b1 Mon Sep 17 00:00:00 2001 From: tselaty Date: Tue, 30 Apr 2013 18:36:36 -0500 Subject: [PATCH 13/33] More damned spriting. Just giving a distiction here. --- .../sprites/rpg/armor/{DKV => DVK}/.DS_Store | Bin .../armor/{DKV/DKV_1.png => DVK/DVK_1.png} | Bin .../armor/{DKV/DKV_5.png => DVK/DVK_10.png} | Bin .../armor/{DKV/DKV_4.png => DVK/DVK_11.png} | Bin .../armor/{DKV/DKV_12.png => DVK/DVK_12.png} | Bin .../armor/{DKV/DKV_2.png => DVK/DVK_2.png} | Bin .../armor/{DKV/DKV_3.png => DVK/DVK_3.png} | Bin .../armor/{DKV/DKV_11.png => DVK/DVK_4.png} | Bin .../armor/{DKV/DKV_10.png => DVK/DVK_5.png} | Bin .../armor/{DKV/DKV_9.png => DVK/DVK_6.png} | Bin .../armor/{DKV/DKV_8.png => DVK/DVK_7.png} | Bin .../armor/{DKV/DKV_7.png => DVK/DVK_8.png} | Bin .../armor/{DKV/DKV_6.png => DVK/DVK_9.png} | Bin images/sprites/rpg/weapons/.DS_Store | Bin 43012 -> 43012 bytes images/sprites/rpg/weapons/DVK/DVK_1.png | Bin 0 -> 212 bytes images/sprites/rpg/weapons/DVK/DVK_10.png | Bin 0 -> 212 bytes images/sprites/rpg/weapons/DVK/DVK_11.png | Bin 0 -> 209 bytes images/sprites/rpg/weapons/DVK/DVK_12.png | Bin 0 -> 212 bytes images/sprites/rpg/weapons/DVK/DVK_13.png | Bin 0 -> 212 bytes images/sprites/rpg/weapons/DVK/DVK_14.png | Bin 0 -> 380 bytes images/sprites/rpg/weapons/DVK/DVK_15.png | Bin 0 -> 348 bytes images/sprites/rpg/weapons/DVK/DVK_2.png | Bin 0 -> 200 bytes images/sprites/rpg/weapons/DVK/DVK_3.png | Bin 0 -> 212 bytes images/sprites/rpg/weapons/DVK/DVK_4.png | Bin 0 -> 200 bytes images/sprites/rpg/weapons/DVK/DVK_5.png | Bin 0 -> 218 bytes images/sprites/rpg/weapons/DVK/DVK_6.png | Bin 0 -> 210 bytes images/sprites/rpg/weapons/DVK/DVK_7.png | Bin 0 -> 212 bytes images/sprites/rpg/weapons/DVK/DVK_8.png | Bin 0 -> 212 bytes images/sprites/rpg/weapons/DVK/DVK_9.png | Bin 0 -> 207 bytes images/sprites/rpg/weapons/unused/.DS_Store | Bin 21508 -> 21508 bytes lib/dragonraid.php | 6 ++---- 31 files changed, 2 insertions(+), 4 deletions(-) rename images/sprites/rpg/armor/{DKV => DVK}/.DS_Store (100%) rename images/sprites/rpg/armor/{DKV/DKV_1.png => DVK/DVK_1.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_5.png => DVK/DVK_10.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_4.png => DVK/DVK_11.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_12.png => DVK/DVK_12.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_2.png => DVK/DVK_2.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_3.png => DVK/DVK_3.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_11.png => DVK/DVK_4.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_10.png => DVK/DVK_5.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_9.png => DVK/DVK_6.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_8.png => DVK/DVK_7.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_7.png => DVK/DVK_8.png} (100%) rename images/sprites/rpg/armor/{DKV/DKV_6.png => DVK/DVK_9.png} (100%) create mode 100644 images/sprites/rpg/weapons/DVK/DVK_1.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_10.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_11.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_12.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_13.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_14.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_15.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_2.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_3.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_4.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_5.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_6.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_7.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_8.png create mode 100644 images/sprites/rpg/weapons/DVK/DVK_9.png diff --git a/images/sprites/rpg/armor/DKV/.DS_Store b/images/sprites/rpg/armor/DVK/.DS_Store similarity index 100% rename from images/sprites/rpg/armor/DKV/.DS_Store rename to images/sprites/rpg/armor/DVK/.DS_Store diff --git a/images/sprites/rpg/armor/DKV/DKV_1.png b/images/sprites/rpg/armor/DVK/DVK_1.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_1.png rename to images/sprites/rpg/armor/DVK/DVK_1.png diff --git a/images/sprites/rpg/armor/DKV/DKV_5.png b/images/sprites/rpg/armor/DVK/DVK_10.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_5.png rename to images/sprites/rpg/armor/DVK/DVK_10.png diff --git a/images/sprites/rpg/armor/DKV/DKV_4.png b/images/sprites/rpg/armor/DVK/DVK_11.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_4.png rename to images/sprites/rpg/armor/DVK/DVK_11.png diff --git a/images/sprites/rpg/armor/DKV/DKV_12.png b/images/sprites/rpg/armor/DVK/DVK_12.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_12.png rename to images/sprites/rpg/armor/DVK/DVK_12.png diff --git a/images/sprites/rpg/armor/DKV/DKV_2.png b/images/sprites/rpg/armor/DVK/DVK_2.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_2.png rename to images/sprites/rpg/armor/DVK/DVK_2.png diff --git a/images/sprites/rpg/armor/DKV/DKV_3.png b/images/sprites/rpg/armor/DVK/DVK_3.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_3.png rename to images/sprites/rpg/armor/DVK/DVK_3.png diff --git a/images/sprites/rpg/armor/DKV/DKV_11.png b/images/sprites/rpg/armor/DVK/DVK_4.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_11.png rename to images/sprites/rpg/armor/DVK/DVK_4.png diff --git a/images/sprites/rpg/armor/DKV/DKV_10.png b/images/sprites/rpg/armor/DVK/DVK_5.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_10.png rename to images/sprites/rpg/armor/DVK/DVK_5.png diff --git a/images/sprites/rpg/armor/DKV/DKV_9.png b/images/sprites/rpg/armor/DVK/DVK_6.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_9.png rename to images/sprites/rpg/armor/DVK/DVK_6.png diff --git a/images/sprites/rpg/armor/DKV/DKV_8.png b/images/sprites/rpg/armor/DVK/DVK_7.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_8.png rename to images/sprites/rpg/armor/DVK/DVK_7.png diff --git a/images/sprites/rpg/armor/DKV/DKV_7.png b/images/sprites/rpg/armor/DVK/DVK_8.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_7.png rename to images/sprites/rpg/armor/DVK/DVK_8.png diff --git a/images/sprites/rpg/armor/DKV/DKV_6.png b/images/sprites/rpg/armor/DVK/DVK_9.png similarity index 100% rename from images/sprites/rpg/armor/DKV/DKV_6.png rename to images/sprites/rpg/armor/DVK/DVK_9.png diff --git a/images/sprites/rpg/weapons/.DS_Store b/images/sprites/rpg/weapons/.DS_Store index 7f8db505015557699b20368d0647015b4881204e..187511968f5d653bde90df3e308beef9acd68cb3 100644 GIT binary patch delta 189 zcmZpK8T@fym Ywh&IUlNE;ovk@rzH<5r1vkPGPNBvJ1oB#j- diff --git a/images/sprites/rpg/weapons/DVK/DVK_1.png b/images/sprites/rpg/weapons/DVK/DVK_1.png new file mode 100644 index 0000000000000000000000000000000000000000..3fc2d40e66dbbb7a7349de2319286ce60b67b77e GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjvproLLn>}1a}-_s%YTSx3zNd( z>MrJgm#-*IIQaY7)63VCCM?{q=i|7sLI6?qrJA;tbH(3uRL Lu6{1-oD!M<|6f#C literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/DVK/DVK_10.png b/images/sprites/rpg/weapons/DVK/DVK_10.png new file mode 100644 index 0000000000000000000000000000000000000000..730f41e6e748943386010bd4cb26cda681c6b1bd GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjvproLLn>}1b8Oi3i~kVM7AA$m zSC{Af_YdxNV4FSfmt%CdL)*Ffzw$?wRz)j_&G{Fl&B&Ve;Pc%Ts*9)fL^)YBH{D=Zc0z5fN|3@npfedf MUHx3vIVCg!0Gu~c8vp~)oxG8^!GMQlvv917 zukTFF87+)2B08j=IV>`-S~A^-E8||QQl#hC>ECZ>p1B#I`O0CBPufBSj`ORJHYx0S z`;F-&W9g}_;&p9(CSnm~l#3&&x8&fCqY6ZFe@FDdYT+P|RU{`OAObnls8U4d?7@O1Ta JS?83{1OUwzQriFk literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/DVK/DVK_12.png b/images/sprites/rpg/weapons/DVK/DVK_12.png new file mode 100644 index 0000000000000000000000000000000000000000..b72f8aa16da614704e2dac580d35cde2269994af GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjvproLLn>}1b8Oi3i~kVM7AA$m z{kLL&`v-SBu}1b8Oi3i~kVM7AA$m z&ny1__YdxNV2fYz(?7b~p{>sTi~LcgRnY=#&ED5{-xS`UYVw)&jJiU1MjGb{c7^*F zbXGX9H5+VF4e73lh-u(qW4*fH{QpY%pC|O%5@#$8@nkSyzR2r-Zc51My9QFWb}Nz? zbu1>-I&HOSnl~$9+5x5cY7={N46o`Oe7-x-+f7$;YfAwe>qf?{uWhE-O>Nl;bS8tR LtDnm{r-UW|G}lm* literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/DVK/DVK_14.png b/images/sprites/rpg/weapons/DVK/DVK_14.png new file mode 100644 index 0000000000000000000000000000000000000000..805e7e5697886b84a302dbfed12fc30e3179b49f GIT binary patch literal 380 zcmV-?0fYXDP)Y5Qg(xuC`IoB5VXfND9H^f*(Y*wD6;kjY>esAt*_ua)=Qz3L;tr#6<*;pq09n zifAJ?nNBOKS7t*_v~}lTxbAtFd3Pp}O(wyWkop*|{W3&F3^pqf^w^x7h@q_;f+-(E z7Ygnr3>@yNVYBbVb|cmW*Xu1|zxzN=vbAk&H+5gjj7qJCm{`#0@2#OaspH_C$Qa^{ zrl2ZoXg(7@KELo}2vK05hwAPmf2-5YeaZY^!hoK<7sEY2i&W4a)$+7P z|6V?0vvHDzJs(qPT3%GEgSY_rG03{{P0q zn`q|?5Z?6p?tlA+EZSMpd}R55xp=4lVbiN<6I9{TOTkz^-WE*5d`1<^K!zwJnE#KM zk^g_|*E9d0{(ldqTaV5Gi&4!IbgYnI0JI<2eoDN*Nt)XWqx8%9%X zLG;Y{|H!m*qB@*S6$@OO-M|<*n3NM${&yVfq+UF@HhY3y4WeO|fcQJU?V(L%!^A-G zu>IRX+7^zW6t(s1QCeF9$tyIq1eDXae7QthOF(7T<}cT2Yf0#|25>1%Q%gdowf^7u u`4Md`0o8_}nvuqq^Z+e+Nn1-`h64b4+!w*GJpe8M0000(4S)f literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/DVK/DVK_2.png b/images/sprites/rpg/weapons/DVK/DVK_2.png new file mode 100644 index 0000000000000000000000000000000000000000..efb8f27cf19a01743e383f42f1cb390af268336e GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj{hlt4Ar-gYPTt7Npvc1<+1nR6 zqp3Bb(=em*r>b`)*S?L`6O>leSoj5e80C>p`*{xPQh})lucP{ z^^ZJj@?+TK_<$iVXKj;#mQ%_@V{VScp~Zf+KRzDUaZ+V=I2dcAw=`#W<@-txh8*`2 zrP~v0XK^I{n6^PVg3WU0?g`vGC;VqU`kQfDv*zU$oD(^KPGj(N^>bP0l+XkKR+>y{ literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/DVK/DVK_3.png b/images/sprites/rpg/weapons/DVK/DVK_3.png new file mode 100644 index 0000000000000000000000000000000000000000..4bcb51f9d054d6224296f685d051a54ac031ec51 GIT binary patch literal 212 zcmV;_04x8AP)8As>gl4{g`2=JU z%`5@=0OT8*1r^9(5Jt9yYLO3%3y{H}p!)ym3H2i%*~Ksnvy>_c0A?V%;mDbiYPlOm zqsIqTEPw?EvQMa%N6=Ff%o14S(bCp-4 z;ycc=&SgkxKEQbAMigseNXv;s>0$zItDnvJ_2F@UWQ!MDL(}ex7_XaUpYMI1z;L7Q zh08YO-zI{GKIkU8Z{R5^DpwRQQvA=|^_@9j{;%!VM69*~oyOql>gTe~DWM4fLJCkz literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/DVK/DVK_5.png b/images/sprites/rpg/weapons/DVK/DVK_5.png new file mode 100644 index 0000000000000000000000000000000000000000..bc0ba2bf50362959ec265090bc2af06da0ec5595 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj3q4&NLn>}1cN9GS$$yAv3zNd( z<>8%wmalYGXg;qqdC^)|1!u>EsZ-eQD6NWSF#0pAN9%^U$!FFZ>gBQj!qvGioD-VB ze<-FRLp(&G*-_%A&?;BE69O|1E?DsE|7VFAZhomD-P|cWo2O`TGNdW&dU#^yq^zCN zZi|nzhw3!2vTyQVG0pu#u<#k7h$oj-HcixBHcRzKjd|9|6{?G;37lJ?V8+mB#N&RW StbGB{u?(KBelF{r5}E*kX;c#c literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/DVK/DVK_6.png b/images/sprites/rpg/weapons/DVK/DVK_6.png new file mode 100644 index 0000000000000000000000000000000000000000..35d9bc21c5ea7855e7d87990274e7914046a7d47 GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjGd*1#Ln>}1b8Oi3i~kVM7AA$m z_pPe`E??=Y(ELB#{NgpG4XVfc7Dl*~a^JdQ@=xAqJ6p7qar}WArcE7Xj;vo8Pner< zYfU()(38V?RY_h_hbLxE%GxRIw)i-Es7?bb z`zHSt)7&ov3!f2+cyd`~Q(%p|uJ;GFhbvSUPwR}1b8Oi3i~kVM7AA$m z%SEjJEMMuW(CmMXckxtoXaW$CNeN$vFN%4b!HMv}p}B44-(< zHgTmGa41JRZ9UO`l=VbHK)~Pse}1cN9GS$$yAv3zNd( z<>8%wmalYGXg;qqdC^)|1?T_wOC2|Myb^2K`QgucKQV@AC*$}7HB6g2(xx@kFnr=Y z+r*V(z@Z%NwDm;$QPvX)0ReyiSN8mx*#9O;qAk*EDhq?Lz}YGlQqA KpUXO@geCyb2~uGI literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/DVK/DVK_9.png b/images/sprites/rpg/weapons/DVK/DVK_9.png new file mode 100644 index 0000000000000000000000000000000000000000..f9e5a0ec394c7817d834d6f5fbe15a38752aeb8c GIT binary patch literal 207 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gj(>z@qLn>~)oxG9vfPw&XWc##9 z^X#~nq|Wb|sHVO2tQd=OWL2O_?|$YlO{d!L*W4(|Tk&A4LfpAaF^&T3%D=KYetC7f z=}E(mw$QbP0 Hl+XkKEMQac literal 0 HcmV?d00001 diff --git a/images/sprites/rpg/weapons/unused/.DS_Store b/images/sprites/rpg/weapons/unused/.DS_Store index 3e72157c67c75c6aca203668a33fd758cab9d3f3..8d814dabf1050c3e3c8ad5b5c75d64b0e0911d69 100644 GIT binary patch literal 21508 zcmeI3yKWm-5Qfi^luXB$xKv3XjjKQ;MT#l{2!;|QNEbD!lE99U3xp`h1#qd-kKjkp zBjgcWmE?lNer_4XQut|~MFQmu?_E})}NUQxd=gc>AZd{g9ng_prJuYQYN*Ttf z^4{&Z9lwmC+`Sbyx7$1yrw`+)Xk!15IL|Nhh&!ch#ks7WmRXq=P&XGLxOk;* z{WUGS;WJWv78TqH8~w{mnY&_Zx9p)ZYz=l^*}AICe^xKm1Jwi71Jwg>p$9Z}$1z+Q z>)Si^T0Kxb@YZ`k{lh3um4{t<)|T0I#6{C*{asV&JmTk=B+{X}4tHc-*PpiZj($0%jVhknE-;n3LU<@Ts zr^Faao=%A|q&=c-R_=2QB~Pcs7)qW_i7}Ksof2axc{(M=ka*s>k39Ed2M)4KJgpLA zNIb0)V@N!$5@Sd_trBBMJdJX}F(jT=i7_OeR*5l`Jf9)Y1@EUOPp8BfN}f)MF_b)= z5@RTNIwi(X@^ng!q2%e57(>aEl?NO{;yD~5&ja4=7Eh~0--@SIqKCv2m3z@j9J9sK zDly{4(<(7;#nURWo#JVfV{T{id;&c8VrGKvOrB1O?M$9d$&nzQtekK=lc!T+JCmnV zVmp(kQ(`-lr&D4iB+r+~b9xO=r^I$9Pp8CoW_~&)wljIMQn?NDgyiXz*v{nXlvvy3 zxvadq^qJ&5=QO%*{8UojE%%p*ZdmHoTh#+=9*B{;+>DqyD#wuv$K{uDT7D{zS3mPs zf3Xr>!}4i7J&%53V>GJQUwM9che6|v&2_8f8B&bJR*CZ*<+@RhdF8EKw@Mr@lA0+w5JO68kju-PR^k5l^=1Mse|UN~R*7PKi{Kr&Ho;LOh!x z@|^g+39Do(FI zjZ>m;m7i9LzD=IaCVD7&Iwfbec(QWF9!j20i5^OxPKhy;JeOx>tNrcln*4N1jG^S| zl<3>!$x5?}oIITpeVh5|lo)-<(qy`C!VO(h>bBMo>qzdQ1W~ZJSX8F+u!z_5O!&O{5~8)~3zRzTObu0-M;IB+qk<1hfCF{7jqM z8*Q5X=j7>ZG8OSuJ8yzb%$4NnY%-O|&$M~Fvl-_9=J8%UzdWPSyZcNeax>pW?`>$K z-eR|X?O+F3{x|Qx@A67nxtZ;J2il3zE|#{P*avCsOq;hh+BCcK%1vX_jez3$G$LRC zHZj_jn}eswb8Nnq5V@H)8?cGduH3XXnTmM2+9H+Y>6Dl&$&;04{~~!hCGKBn>>T`w zR3=O%c{(Li5l^Q?-zHC1s#k!Oa^|N~qKA^FQ`)i9v~$XPn#t4IL=TDQ*0;#he10LG zR*4?c*lCsMA@Q_Ij3M!~O3v))Z>;U&r`h>Po=)j`zE-{- zq2nc^cCN6{`~M&E_y5|b>a}{Hdf<)pKr=WxK6(&M>)x$jYoy+_AI14qoI3Q}nSO{P ze$H3%qa1X<5AzS*CGH<~_s`l=YUxrIWy+##W&hw80PaOqW4y4VIF4>PpL3%)j&61Q zkMD#}WA2F_s^fop=-(dyGY{*fdZ2osdZ2osdZ2osdZ2osdZ2osdZ2osdZ2osdZ2os LdZ2pX&GW!t5WaO_ literal 21508 zcmeI3-EPxB5QWE3P$hoUN3aCfsQ!(87gePa*E|5I1tFw}A|dYc20Sv%SsN)%isF1o zKA9=@E^ttLzx$ixh*Kb~r z9B=l~uI#;4{-=NVua|p1Kvf^RJ+UvgnvDOAy|B;r$v(VVU0+?Ut}p#tC*LQ!D4i!!L55^|@T=RQ$Ea0jVz^+vV7xxVi0a%|T_ zJHRa);FgV&6}YHmNxHYWzwweSQxlh9AQ-rTf#=@09liE2qU`JxBMXcyF|xu)8m)KM zV3{<|?`(l(&dpriJ@hkC3-y-`i*aSo-Qo#~k}RQoL1UJ;VbQ%I(_LNZOLt-$jv z@H`7V&jM;f?PI0uS>kz?c%J2N%#&(Dh38q}c~*Fy%3#mS;coA2?G}op`?Ee^v`;rO z-EBILbe)&$zQKWru3#V-2nK?IU?3Q{bqrkih&SVZ`RgopE8N#-5w(ykMpcZ!ye%PF zEG{JT4aE;-sKN{>1|$BcqA2E%3Q2XS!3;HcJsZqzi@9y_JX^dfgSS7=)1TUe7RFK9 z*K~g_@OsjWSK(Sq_ezgP+rzyg%g3yVkj&ne&JSZqNM>)9A7Q!A(r3wXWkOPJsoqK^ zpC?_<`S+?#{REwXY-bBeb*RIu(m|`K(b83+S@6;=0_B!w!6lPwJhgq2Nx7w&_sW@N z+9xElCPFe#N=Rlkg=99Na(A(?bl z=xHyRlw0i<5+f;|qc(y5sv(*4t>(Uj#IvpVU!$U2=vOetB8@aP+WA~;#xz3GJ$%To zE!#5b9&YfeG}tCLcs*$pU-@ZA?FNniC6nq9%^XN3wN(v12U@H{G|wSRMQsAjkVq!g zA(|nPOsYdIwnHt}p%&{9&F3h8Nqs{a#Y-lOX@sOYMB{(Sq&l>4?4c*G*~7s(=yd=8 z%U?hLx6g%$&x3(r;1)BG9i6{EKl2HU_tx)BMfck0Uf+6E(f8JR;l*F4Tk*Y3x8i#{ zd05!rFURk#ht_+%{DlVqZhCrm>YvB?zx#ail%Y8P_cKH@c7OW(Px~+~!9Xw&3~} diff --git a/lib/dragonraid.php b/lib/dragonraid.php index be5f131..8d85dba 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -996,8 +996,7 @@ static function getPlayerSprite($post){ // Dragonborn if($class == "DVK"){ - $class == "DK"; //temp - $segment_range = array_chunk($range, 32); + $segment_range = array_chunk($range, 5); } $segment = array_tree_search_key($segment_range, $post_id[1]); @@ -1052,8 +1051,7 @@ static function getPlayerWeapon($post){ // Dragonborn if($class == "DVK"){ - $class = "DK"; //temp - $segment_range = array_chunk($range, 3); + $segment_range = array_chunk($range, 5); } // Last character of ID, instead of the first From 55a6f35d7703fa201cc2036bb483f9dbce97686e Mon Sep 17 00:00:00 2001 From: tselaty Date: Tue, 30 Apr 2013 18:59:29 -0500 Subject: [PATCH 14/33] Fixed bug with labels wrapping, added in new health@command. --- lib/dragonraid.php | 34 +++++++++++++++++++++++++++++++--- site.css | 3 ++- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index 8d85dba..02a324a 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -83,26 +83,34 @@ 'ice' => 'Frost Golem', ); - var $_miss_hits = array('2','31','51'); + // Less than 22 = death while enraged + var $_miss_hits = array('23','51','71'); /** * Init functions * @param array $_parsed_thread Parsed thread from the json API */ function __construct($_parsed_thread){ + + $this->THREAD = $_parsed_thread; $this->OPost = $this->THREAD->posts[0]; $this->OP = $this->OPost->id; $this->THREAD_ID = $this->OPost->no; + /* Uncomment to force dev variables + $this->OPost->com = "name@LichKing + difficulty@hard + element@ice + health@19900"; + */ + //boss status $this->BossIMG = "http://thumbs.4chan.org/b/thumb/".$this->OPost->tim."s.jpg"; $this->setBossDifficulty('easy'); $this->BossElement = self::getBossElement($this->OPost->no); $this->BossName = "RandomBeast"; - - /** * OP COMMANDS */ @@ -125,6 +133,12 @@ function __construct($_parsed_thread){ } } + //set OP options [health@] + if($_health = self::checkForCommand('health@',$this->OPost)){ + echo "yeah"; + $this->setBossHealth($_health); + } + } @@ -297,6 +311,11 @@ function isDeadPlayer($_id){ return in_array($_id, $this->deadPlayers); } + /** + * Set boss difficulty + * @param string $difficulty preg_matched difficulty + * @return null + */ function setBossDifficulty($difficulty){ switch ($difficulty) { case 'noob': @@ -334,6 +353,15 @@ function setBossDifficulty($difficulty){ } + /** + * Overrides boss's health + * @param string $health preg_matched health + */ + function setBossHealth($health){ + $this->BossHP_MAX = ($boss_min_hp > 27000 ? 27000 : $health); + $this->BossHP = $this->BossHP_MAX; + } + function getBossElement($id) { $last_digit = substr($id, -1); diff --git a/site.css b/site.css index 6c20833..a6de6ed 100644 --- a/site.css +++ b/site.css @@ -79,4 +79,5 @@ ul.menu ul{ #t_commands ul li{ padding:1px; margin-left:40px; -} \ No newline at end of file +} +.ink-label {white-space: nowrap;} From bd761cc26f064a8583c39bf2b586949c688bf195 Mon Sep 17 00:00:00 2001 From: tselaty Date: Tue, 30 Apr 2013 19:08:13 -0500 Subject: [PATCH 15/33] Case sensitivity for OP's commands --- lib/dragonraid.php | 17 +++++++++++------ template/fight.tpl | 4 ++-- template/tutorial.tpl | 6 ++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index 02a324a..d8f6761 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -111,10 +111,13 @@ function __construct($_parsed_thread){ $this->setBossDifficulty('easy'); $this->BossElement = self::getBossElement($this->OPost->no); $this->BossName = "RandomBeast"; + /** * OP COMMANDS */ - $this->OPost->commands = self::parseCommandValues($this->OPost); + + // OP's commands should be case sensitive, like the boss name + $this->OPost->commands = self::parseCommandValues($this->OPost, true); //set OP options [difficulty@] if($_difficulty = self::checkForCommand('difficulty@',$this->OPost)){ @@ -135,8 +138,7 @@ function __construct($_parsed_thread){ //set OP options [health@] if($_health = self::checkForCommand('health@',$this->OPost)){ - echo "yeah"; - $this->setBossHealth($_health); + $this->setBossHealth((int)$_health); } } @@ -358,7 +360,7 @@ function setBossDifficulty($difficulty){ * @param string $health preg_matched health */ function setBossHealth($health){ - $this->BossHP_MAX = ($boss_min_hp > 27000 ? 27000 : $health); + $this->BossHP_MAX = ($health > 27000 ? 27000 : $health); $this->BossHP = $this->BossHP_MAX; } @@ -1109,7 +1111,7 @@ static function isCriticalHit($num){ * @param object $post the full post object * @return array full command list */ - static function parseCommandValues($post){ + static function parseCommandValues($post, $case_sensitive = false){ if(!isset($post->com)){ return array(); } @@ -1118,7 +1120,10 @@ static function parseCommandValues($post){ return array(); } - $_text = strtolower($post->com); + $_text = $post->com; + if($case_sensitive == false) { + $_text = strtolower($post->com); + } $_text = strip_tags($_text,"
"); $_text = str_replace("
", " ", $_text); $_text = str_replace("
", " ", $_text); diff --git a/template/fight.tpl b/template/fight.tpl index e759efe..c123b90 100644 --- a/template/fight.tpl +++ b/template/fight.tpl @@ -17,7 +17,7 @@ $BossName = $this->BossName;

Dragonchan #THREAD_ID; ?> - version _version; ?> (More Info) + version _version; ?> (More Info)


@@ -96,7 +96,7 @@ $BossName = $this->BossName;
diff --git a/template/tutorial.tpl b/template/tutorial.tpl index af08d49..b22eebe 100644 --- a/template/tutorial.tpl +++ b/template/tutorial.tpl @@ -495,6 +495,12 @@
  • element@ice
  • element@electric
  • +

    health@

    +

    Defines the boss manually.

    + Variable value +
      +
    • health@
    • +

    Player Commands

    From 6a4432f9591c78d2862302514c91df0dd0b69583 Mon Sep 17 00:00:00 2001 From: tselaty Date: Tue, 30 Apr 2013 19:10:25 -0500 Subject: [PATCH 16/33] Restrict the length of nicknames to 14 characters, so they don't go on for a year --- lib/dragonraid.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index d8f6761..31b8848 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -654,6 +654,12 @@ function canAvenge($avenge_target){ * @param string $nickname the desired nickname */ function setNickname($user_id,$nickname){ + + // Stop fucking making names a dickyear long + if(strlen($nickname) > 14) { + $nickname = substr($nickname, 0, 14); + } + if($nickname=="heaven"){ return false; //fuck off } From e677334ad2f6c2452beaacf84422923fab5db3ef Mon Sep 17 00:00:00 2001 From: tselaty Date: Tue, 30 Apr 2013 19:16:42 -0500 Subject: [PATCH 17/33] Did you summon an available element? --- lib/dragonraid.php | 9 ++++++++- template/tutorial.tpl | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/dragonraid.php b/lib/dragonraid.php index 31b8848..3b6af1f 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -485,8 +485,14 @@ function damage($post,$canCritical=true,$reportDamage=true){ // Give W's a possible elemental damage for their pets // Maybe break out into a summoner class? + + //set OP options [difficulty@] + if($_summon = self::checkForCommand('summon@',$this->OPost)){ + $_summon_element = $_summon; + } + foreach($this->available_elements as $element) { - if(strpos(strtolower($post->com), $element) !== false) { + if(!empty($_summon_element) && $_summon_element == $element) { $chosen_element = $element; $post->chosen_element = $chosen_element; break; @@ -501,6 +507,7 @@ function damage($post,$canCritical=true,$reportDamage=true){ // If the element is the same as the boss, make him resistant $_pet_damage = ceil($_pet_damage * .5); } + $post->_pet_damage = $_pet_damage; $post->bonus+=$_pet_damage; } diff --git a/template/tutorial.tpl b/template/tutorial.tpl index b22eebe..8e2a77a 100644 --- a/template/tutorial.tpl +++ b/template/tutorial.tpl @@ -505,7 +505,7 @@

    Player Commands

    nickname@

    -

    Sets your nickname, you only need to set it once

    +

    Sets your nickname, you only need to set it once (max length 14 characters)

    variable value
    • nickname@[yournick]
    • From 2a245a928413c42e94e8a3cd8b53d537392325f9 Mon Sep 17 00:00:00 2001 From: tselaty Date: Tue, 30 Apr 2013 19:40:45 -0500 Subject: [PATCH 18/33] Warlock summoning tutorial cleanup --- images/sprites/rpg/armor/DVK/.DS_Store | Bin 6148 -> 6148 bytes lib/dragonraid.php | 9 ++++- template/tutorial.tpl | 54 ++++++++++++++----------- 3 files changed, 37 insertions(+), 26 deletions(-) diff --git a/images/sprites/rpg/armor/DVK/.DS_Store b/images/sprites/rpg/armor/DVK/.DS_Store index 0b5346befa80563c8bc36d6bd80e4ec063ff524d..2879278cf12b181520731812ff51a774e347cf5b 100644 GIT binary patch delta 68 zcmZoMXfc=&$!)@*$56nK$Bcom = "summon@fire"; + */ + + //get the current player class $post->class = self::getPlayerClass($post->id); @@ -486,8 +492,7 @@ function damage($post,$canCritical=true,$reportDamage=true){ // Give W's a possible elemental damage for their pets // Maybe break out into a summoner class? - //set OP options [difficulty@] - if($_summon = self::checkForCommand('summon@',$this->OPost)){ + if($_summon = self::checkForCommand('summon@',$post)){ $_summon_element = $_summon; } diff --git a/template/tutorial.tpl b/template/tutorial.tpl index 8e2a77a..9443eb7 100644 --- a/template/tutorial.tpl +++ b/template/tutorial.tpl @@ -116,7 +116,7 @@ You can use this webpage to track the party damage, by placing the 4chan thread ID after the URL.

      - +

      Starting a thead

      @@ -143,7 +143,7 @@ Some skills (depending on your class) will add or remove damage to your roll.

      - +

      Death

      @@ -181,7 +181,7 @@
    • Knights can critical hit by rolling 5 or 0
    • Knights avenge fallen soldiers by targeting them and rolling an EVEN number. Avenging does more damage for the glory of the fallen mate.
    • Paladins can avenge AND revive!
    • -
    • Warlocks can summon minions by posting an image. The last 2 digits of the image filename will be added to his damage. if his roll last digit matches his minion last digit he BURSTS massive damage. If the Warlock types the words "ice", "fire", "water", "electric", or "earth" in their post, they can summon a minion of the specific element for 1.5x additional minion damage if the Beast is weak to the element. If the element is the same as the Beast, the additional minion damage will do .5x the damage instead.
    • +
    • Warlocks can summon minions by posting an image. The last 2 digits of the image filename will be added to his damage. if his roll last digit matches his minion last digit he BURSTS massive damage. If the Warlock types the words "summon@ice", "summon@fire", "summon@water", "summon@electric", or "summon@earth" in their post, they can summon a minion of the specific element for 1.5x additional minion damage if the Beast is weak to the element. If the element is the same as the Beast, the additional minion damage will do .5x the damage instead.
    • Death Knights can continue attacking after they die. they will do x2 damage when dead but only 2/3 when alive.
    • DragonBorn can avenge and revive when alive, and will transform into a Death knight after death. this is the ultimate class!
    • you can be avenged/revived 6 times max
    • @@ -203,7 +203,7 @@

      - +

      @@ -228,7 +228,7 @@

      Critical Hit Chance

      Knights critical hit if their roll ends in "0" or "5". this means the hit does double damage.

      - +

      How to Avenge

      @@ -237,7 +237,7 @@ To avenge a fallen soldier you must target him (by quoting his post) and roll an EVEN number (ends in 0,2,4,6,8).

      - +

      If the avenging roll is successfull you will swing your sword once again for every target. @@ -265,7 +265,7 @@

      Paladins can NOT critical hit.

      - +

      How to Revive

      @@ -274,7 +274,7 @@

      - +

      @@ -295,7 +295,7 @@ To avenge a fallen soldier you must target him (by quoting his post) and roll an EVEN number (ends in 0,2,4,6,8).

      - +

      If the avenging roll is successfull you will swing your sword once again for every target. @@ -351,7 +351,7 @@

      Bard buffs stack with each other and with every other bonus!

      - +
    @@ -372,35 +372,35 @@ If a minion rolls trips or quads, that many damage is added.

    - +

    Elemental Damage

    You can summon 6 diferent minions by typing diferent commands in your post:

      -
    • IMP - default summon
    • -
    • WATER golem - type 'water' in your post
    • -
    • FIRE golem - type 'fire' in your post
    • -
    • ICE golem - type 'ice' in your post
    • -
    • EARTH golem - type 'earth' in your post
    • -
    • ELECTRIC golem - type 'electric' in your post
    • +
    • IMP - default summon
    • +
    • WATER golem - type 'summon@water' in your post
    • +
    • FIRE golem - type 'summon@fire' in your post
    • +
    • ICE golem - type 'summon@ice' in your post
    • +
    • EARTH golem - type 'summon@earth' in your post
    • +
    • ELECTRIC golem - type 'summon@electric' in your post

    - If you summon the correct element, your summon will be more powerfull. + If you summon the correct element, your summon will be more powerful.
    You can only assign 1 element per post, so if you type more than one only the first one will be considered.
    The bonus and element are visible on the battle log.

    - +

    Burst Damage

    Warlocks will critical hit if the minion last digit matches their roll last digit. This is called burst damage and it will greatly increase the minion's power.

    Burst damage stacks with elemental bonus!

    If a minion rolls trips or quads, that many damage is added, but the burst damage is not applied.

    - +
    @@ -520,7 +526,7 @@ - + \ No newline at end of file diff --git a/template/invalid_thread.tpl b/template/invalid_thread.tpl index d9d71f3..57b9f24 100644 --- a/template/invalid_thread.tpl +++ b/template/invalid_thread.tpl @@ -3,14 +3,14 @@ - Chan Boss Raid + <?php echo $_gamename;?> Fork me on GitHub
    -

    Dragonchan

    +


    diff --git a/template/status_core.tpl b/template/status_core.tpl index afb6c00..995ad47 100644 --- a/template/status_core.tpl +++ b/template/status_core.tpl @@ -1,13 +1,18 @@ + +
    - Dragonchan (THREAD_ID ?>) - version _version;?> + (THREAD_ID ?>) + version

    HP: BossHP ?>/BossHP_MAX ?>

    WINNER && $this->bossIsEnraged()){ - echo "The best is enraged!"; + echo "The boss is enraged!"; } ?>
    From 66d5f84c52eb5859825185cceaa3922c442bf8be Mon Sep 17 00:00:00 2001 From: danielmm8888 Date: Sun, 7 May 2017 03:27:24 +0200 Subject: [PATCH 30/33] Fixed reviving and avenging (fixed reply detection) --- README.md | 3 +++ lib/dragonraid.php | 5 +++-- lib/globalinfo.php | 2 +- template/info.tpl | 8 ++++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 65765ae..f936c6e 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,9 @@ The boss will enrage bellow 20% HP, the minimum roll will be 22. however, he wil Changelog ========= +__v1.7.2- 07-05-2017__ + - Fixed reviving and avenging (fixed reply detection) + __v1.7.1- 06-05-2017__ - Fixed 4chan API links - Changed default board to /bant/ diff --git a/lib/dragonraid.php b/lib/dragonraid.php index f835b3b..a7ccb66 100644 --- a/lib/dragonraid.php +++ b/lib/dragonraid.php @@ -1217,11 +1217,12 @@ static function checkForCommand($command,$post){ */ function getTargetPosts($text){ $text = html_entity_decode($text); - $preg = preg_match_all('/>>(\d+){9}/i', $text,$raw); + $text = str_replace("\"","",$text); + $preg = preg_match_all('/>>>([0-9]+)<\/a>/', $text,$raw); $match = array(); if(isset($raw[0])){ foreach ($raw[0] as $key => $value) { - $match[$key] = str_replace(">", '', $value); + $match[$key] = str_replace(array('>', ' \ No newline at end of file diff --git a/template/info.tpl b/template/info.tpl index 08ded55..1041a34 100644 --- a/template/info.tpl +++ b/template/info.tpl @@ -10,7 +10,7 @@ Fork me on GitHub
    -

    version

    +

    version


    @@ -57,6 +57,10 @@

    Changelog

    +

    v1.7.2- 07-05-2017

    +
      +
    • Fixed reviving and avenging (fixed reply detection)
    • +

    v1.7.1- 06-05-2017