Skip to content

Commit

Permalink
fix boss-mode scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
haveatry823 committed Nov 9, 2012
1 parent cb4fff3 commit f4aeb8a
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/scenario/boss-mode-scenario.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,15 @@ class ImpasseRule: public ScenarioRule{

boss_banlist << "yuanshao" << "yanliangwenchou" << "zhaoyun" << "guanyu" << "shencaocao";

boss_skillbanned << "luanji" << "shuangxiong" << "longdan" << "wusheng" << "guixin";
boss_skillbanned << "luanji" << "shuangxiong" << "longdan" << "wusheng" << "guixin" << "fenyong" << "xuehen";

dummy_skills << "xinsheng" << "wuhu" << "kuangfeng" << "dawu" << "wumou" << "wuqian"
<< "shenfen" << "renjie" << "weidi" << "danji" << "shiyong" << "zhiba"
<< "super_guanxing" << "chongzhen" << "tongxin"
<< "liqian" << "shenjun" << "xunzhi" << "shenli" << "yishe" << "yitian";
<< "liqian" << "shenjun" << "xunzhi" << "shenli" << "yishe" << "yitian"
<< "fenyong" << "xuehen";

available_wake_skills << "hunzi" << "zhiji" << "kegou";
available_wake_skills << "hunzi" << "zhiji" ;
}

void getRandomSkill(ServerPlayer *player, bool need_trans = false) const{
Expand Down Expand Up @@ -430,23 +431,22 @@ class ImpasseRule: public ScenarioRule{

case Death:{
QList<ServerPlayer *> players = room->getAlivePlayers();
bool hasRebel = false, hasLord = false;
foreach(ServerPlayer *each, players){
if(each->getRole() == "rebel")
hasRebel = true;
if(each->getRole() == "lord"){
hasLord = true;
if(each->getMaxHp() > 3)
room->setPlayerProperty(each, "maxhp", each->getMaxHp()-1);

if(each->getMark("@frantic") > (players.length()-1))
each->loseMark("@frantic");
}
}
if(!hasRebel)
room->gameOver("lord");
if(!hasLord)
ServerPlayer *lord = room->getLord();

if (player->isLord()) room->gameOver("rebel");
if (players.length()==1 && lord->isAlive()) room->gameOver("lord");

if(lord->getMaxHp() > 3)
room->setPlayerProperty(lord, "maxhp", lord->getMaxHp()-1);

if(lord->getMark("@frantic") > (players.length()-1))
lord->loseMark("@frantic");

QStringList alive_roles = room->aliveRoles();
if(alive_roles.contains("rebel") && !alive_roles.contains("lord"))
room->gameOver("rebel");
if(alive_roles.contains("lord") && !alive_roles.contains("rebel"))
room->gameOver("lord");

DamageStar damage = data.value<DamageStar>();
if(damage && damage->from){
Expand Down

0 comments on commit f4aeb8a

Please sign in to comment.