Beispiel #1
0
void Pistol::onInstall(ServerPlayer *player) const{
    EquipCard::onInstall(player);
    Room *room = player->getRoom();
    room->setPlayerProperty(player, "atk", player->getHp());
    if(attach_skill)
        room->attachSkillToPlayer(player, objectName());
}
Beispiel #2
0
void Weapon::onInstall(ServerPlayer *player) const{
    EquipCard::onInstall(player);
    Room *room = player->getRoom();

    if(attach_skill)
        room->attachSkillToPlayer(player, objectName());
}
Beispiel #3
0
void EquipCard::onInstall(ServerPlayer *player) const
{
    Room *room = player->getRoom();

    const Skill *skill = Sanguosha->getSkill(this);
    if (skill) {
        if (skill->inherits("ViewAsSkill")) {
            room->attachSkillToPlayer(player, objectName());
        } else if (skill->inherits("TriggerSkill")) {
            const TriggerSkill *trigger_skill = qobject_cast<const TriggerSkill *>(skill);
            room->getThread()->addTriggerSkill(trigger_skill);
            if (trigger_skill->getViewAsSkill() != NULL)
                room->attachSkillToPlayer(player, objectName());
        }
    }
}
Beispiel #4
0
void EquipCard::onInstall(ServerPlayer *player) const{
    Room *room = player->getRoom();

    if(skill)
        room->getThread()->addTriggerSkill(skill);
    if (Sanguosha->getSkill(this) && Sanguosha->getSkill(this)->inherits("ViewAsSkill"))
        room->attachSkillToPlayer(player, this->objectName());
}
Beispiel #5
0
 virtual void onGameStart(ServerPlayer *zhangjiao) const{
     Room *room = zhangjiao->getRoom();
     QList<ServerPlayer *> players = room->getAlivePlayers();
     foreach(ServerPlayer *player, players){
         room->attachSkillToPlayer(player, "huangtianv");
     }