FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Proposal] #82 - Bandit Kill Command Bonus (Approved)

 
Post new topic   Reply to topic    Drop Shock Forum Index -> Open Source
View previous topic :: View next topic  
Author Message
ParalyzeD
Intermediate


Joined: 16 Mar 2009
Posts: 461

PostPosted: Fri Mar 15, 2013 6:49 am    Post subject: [Proposal] #82 - Bandit Kill Command Bonus (Approved) Reply with quote

https://sourceforge.net/p/dropshock/tickets/82/

Each bandit kill provides 0.2 command.

While dying to bandits yield command why doesn't killing bandits give any command? There was a discussion on upping daily command, top bandit killer, pvp killer, etc, but since we do not have access to those codes, I believe this is the way to go.

A concern was raised that certain players can kill 700+ bandits in a given day, ie. certain somebody on new player kills (i assume we all know who that person is). However 700 kills is merely 140 command, if he so chooses, he can easily earn 10x that on a relic planet. However, a new player that kills 50 bandits on taris/riona can gain about 10 command giving them enough for perhaps another drop.

thoughts?
_________________
IGN : eV
Back to top
View user's profile Send private message
Walterohdim
Site Admin


Joined: 15 Jun 2006
Posts: 1629
Location: Somewhere with lots of doors

PostPosted: Fri Mar 15, 2013 1:41 pm    Post subject: Reply with quote

Quote:
If the code checks out I vote Aye.


I really like the idea of rewarding active play with command. I have also noticed that with the uptick in activity that command has gotten really expensive, and so the game can afford to have a bit more command added.



If the code passes muster and Frizz likes it this should be added with the next update if my counting skills are up to snuff, as I count 5 yes votes.

Walterohdim
_________________
Wannabee historian of Tinywarz. Through the building of myth we will build community. M. Scott Peck

Back to top
View user's profile Send private message Visit poster's website
khaibar
Advanced


Joined: 14 Dec 2007
Posts: 1141

PostPosted: Sun Mar 17, 2013 10:50 pm    Post subject: Reply with quote

Nice idea

However an issue in your code

Code:
if ( ($canDestroy) AND ($planet_duel == "N") AND ($unitdata[$weapon->target_id]["is_bandit"] == "N") AND ($unitdata[$weapon->target_id]["is_shakahr"] == "N") AND ($unitdata[$weapon->target_id]["crew_id"] != 11) AND ($unitdata[$weapon->target_id]["crew_id"] != 38) ) {

               $pvpKill = true;

               //Log destruction
               $sqltext ="INSERT INTO tinywarz_live.log_unit_kill (i_owner,unit_id,killer_id,i_planet) VALUES (?,?,?,?)";
               $res =& $db->query($sqltext, Array($unitdata[$weapon->target_id]["i_owner"], $unitdata[$weapon->target_id]["unit_id"], $weapon->i_owner, $planetid) );
               if (DB::isError($res)) { ReportDBError($res, "process_turn"); }

               //Give victim % of drop cost back as command
               if ($unitdata[$weapon->target_id]["c_type"] == "bld") { $des_com = round(($unitdata[$weapon->target_id]["i_ce"]/1000),2); }
               else { $des_com = round(($unitdata[$weapon->target_id]["i_ce"]/200),2); }

               $user_commandpoints[($unitdata[$weapon->target_id]["i_owner"])] += $des_com;
               $comMsg["v"] = " [+<b>$des_com</b>Cmd]";

               if (isset($commander_units[($unitdata[$weapon->target_id]["i_owner"])])) {
                  $actionMessages[] = "(".$commander_units[($unitdata[$weapon->target_id]["i_owner"])].",0,".$des_com.",\"C\",".$unitdata[$weapon->target_id]["i_owner"].")";
               }

               //Give Attacker Command for destroyed unit
          if ($unitdata[$weapon->target_id]["is_bandit"] == "Y")
             {$des_com = 0.2}
               if ( ($faction_levels[($userdata[$weapon->i_owner]["i_faction"])]->level_combat >= 9) AND ($unitdata[$weapon->target_id]["c_type"] != "bld") AND ($unitdata[$weapon->target_id]["is_salvageable"] == "Y") ) {
                  if ($faction_levels[($userdata[$weapon->i_owner]["i_faction"])]->i_size < $const_smallFac) { $rewConst = 200; } else { $rewConst = 400; }
          }

                  // Com reward of destroyed unit drop cost
                  $des_com = round(($unitdata[$weapon->target_id]["i_ce"]/$rewConst),2);

                  $user_commandpoints[$weapon->i_owner] += $des_com;
                  $comMsg["a"] = " [+<b>$des_com</b>Cmd]";
                  unset($rewConst);

                  if (isset($commander_units[$weapon->i_owner])) {
                     $actionMessages[] = "(".$commander_units[$weapon->i_owner].",0,".$des_com.",\"C\",".$weapon->i_owner.")";
                  }
               

            }



You put your check for bandit inside a block that checks for NOT a bandit

Code:
if ( ($canDestroy) AND ($planet_duel == "N") AND ($unitdata[$weapon->target_id]["is_bandit"] == "N") AND ($unitdata[$weapon->target_id]["is_shakahr"] == "N") AND ($unitdata[$weapon->target_id]["crew_id"] != 11) AND ($unitdata[$weapon->target_id]["crew_id"] != 38) ) {


A way is to add a big else with all conditions except the bandit check or remove the bandit check and add it inside the big if.
I suggest the latter as it would require less processing on the server side.
Back to top
View user's profile Send private message
Vanoi
Site Admin


Joined: 25 Aug 2005
Posts: 1403
Location: Avoiding You (The Void)

PostPosted: Tue Mar 19, 2013 7:43 am    Post subject: Reply with quote

This has been approved.
_________________
The person who will go to great lengths to fight boredom...
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Drop Shock Forum Index -> Open Source All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group