Skip to content

Commit

Permalink
Add the emotion of jink and AOE.
Browse files Browse the repository at this point in the history
Add EightDiagram's Audio.
  • Loading branch information
ubun committed Oct 13, 2011
1 parent 083b72c commit f5f767b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
Binary file added audio/system/eight_diagram.ogg
Binary file not shown.
File renamed without changes
9 changes: 7 additions & 2 deletions src/package/standard-cards.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ class EightDiagramSkill: public ArmorSkill{
jink->setSkillName(objectName());
room->provide(jink);
room->setEmotion(player, "good");
room->broadcastInvoke("playAudio", objectName());

return true;
}else
Expand Down Expand Up @@ -554,7 +555,9 @@ SavageAssault::SavageAssault(Suit suit, int number)
void SavageAssault::onEffect(const CardEffectStruct &effect) const{
Room *room = effect.to->getRoom();
const Card *slash = room->askForCard(effect.to, "slash", "savage-assault-slash:" + effect.from->objectName());
if(slash == NULL){
if(slash)
room->setEmotion(effect.to, "killer");
else{
DamageStruct damage;
damage.card = this;
damage.damage = 1;
Expand All @@ -575,7 +578,9 @@ ArcheryAttack::ArcheryAttack(Card::Suit suit, int number)
void ArcheryAttack::onEffect(const CardEffectStruct &effect) const{
Room *room = effect.to->getRoom();
const Card *jink = room->askForCard(effect.to, "jink", "archery-attack-jink:" + effect.from->objectName());
if(jink == NULL){
if(jink)
room->setEmotion(effect.to, "jink");
else{
DamageStruct damage;
damage.card = this;
damage.damage = 1;
Expand Down
4 changes: 3 additions & 1 deletion src/server/room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,10 @@ void Room::slashResult(const SlashEffectStruct &effect, const Card *jink){

if(jink == NULL)
thread->trigger(SlashHit, effect.from, data);
else
else{
setEmotion(effect.to, "jink");
thread->trigger(SlashMissed, effect.from, data);
}
}

void Room::attachSkillToPlayer(ServerPlayer *player, const QString &skill_name){
Expand Down

0 comments on commit f5f767b

Please sign in to comment.