Skip to content

Commit

Permalink
火车司机、小铃铛、李醒的技能、威逼,改为能对自己使用,哑炮技能必须其他角色才能触发
Browse files Browse the repository at this point in the history
  • Loading branch information
CuteReimu committed Oct 11, 2023
1 parent 6ef547f commit 0fbabce
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 21 deletions.
5 changes: 0 additions & 5 deletions src/main/kotlin/card/WeiBi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ class WeiBi : Card {
(r as? HumanPlayer)?.sendErrorMessage("威逼的使用时机不对")
return false
}
if (r === target) {
log.error("威逼不能对自己使用")
(r as? HumanPlayer)?.sendErrorMessage("威逼不能对自己使用")
return false
}
if (!target.alive) {
log.error("目标已死亡")
(r as? HumanPlayer)?.sendErrorMessage("目标已死亡")
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/skill/ShouKouRuPing.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ShouKouRuPing : InitialSkill, TriggeredSkill {
fsm.cardType == Shi_Tan || fsm.cardType == Wei_Bi || return null
fsm.valid || return null
val targetPlayer = fsm.targetPlayer!!
askWhom === fsm.player || askWhom === targetPlayer || return null
(askWhom === fsm.player || askWhom === targetPlayer) && fsm.player !== targetPlayer || return null
askWhom.getSkillUseCount(skillId) == 0 || return null
askWhom.addSkillUseCount(skillId)
log.info("${askWhom}发动了[守口如瓶]")
Expand Down
5 changes: 0 additions & 5 deletions src/main/kotlin/skill/SouJi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ class SouJi : InitialSkill, ActiveSkill {
(r as? HumanPlayer)?.sendErrorMessage("目标错误")
return
}
if (pb.targetPlayerId == 0) {
log.error("不能以自己为目标")
(r as? HumanPlayer)?.sendErrorMessage("不能以自己为目标")
return
}
val target = g.players[r.getAbstractLocation(pb.targetPlayerId)]!!
if (!target.alive) {
log.error("目标已死亡")
Expand Down
5 changes: 0 additions & 5 deletions src/main/kotlin/skill/WorkersAreKnowledgable.kt
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@ class WorkersAreKnowledgable : InitialSkill, ChangeDrawCardCountSkill, Triggered
(player as? HumanPlayer)?.sendErrorMessage("目标错误")
return null
}
if (it == 0) {
log.error("不能以自己为目标")
(player as? HumanPlayer)?.sendErrorMessage("不能以自己为目标")
return null
}
val target = r.game!!.players[r.getAbstractLocation(it)]!!
if (!target.alive) {
log.error("目标已死亡")
Expand Down
5 changes: 0 additions & 5 deletions src/main/kotlin/skill/XinGeLianLuo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ class XinGeLianLuo : InitialSkill, TriggeredSkill {
(player as? HumanPlayer)?.sendErrorMessage("目标错误")
return null
}
if (message.targetPlayerId == 0) {
log.error("不能以自己为目标")
(player as? HumanPlayer)?.sendErrorMessage("不能以自己为目标")
return null
}
val target = r.game!!.players[r.getAbstractLocation(message.targetPlayerId)]!!
if (!target.alive) {
log.error("目标已死亡")
Expand Down

0 comments on commit 0fbabce

Please sign in to comment.