Merge pull request #1162 from universe-st/PR-Branch-240406
修复多处事件不满足条件return;的问题
This commit is contained in:
commit
30becb29b8
|
@ -5249,7 +5249,6 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
drawTo(num, args) {
|
||||
var num2 = num - this.countCards('h');
|
||||
if (!num2) return;
|
||||
var next = this.draw(num2);
|
||||
if (Array.isArray(args)) {
|
||||
for (var i = 0; i < args.length; i++) {
|
||||
|
@ -5941,8 +5940,11 @@ export class Player extends HTMLDivElement {
|
|||
return next;
|
||||
}
|
||||
doubleDraw() {
|
||||
if (get.is.changban()) return;
|
||||
var next = game.createEvent('doubleDraw');
|
||||
if (get.is.changban()) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.player = this;
|
||||
next.setContent('doubleDraw');
|
||||
return next;
|
||||
|
@ -6421,18 +6423,24 @@ export class Player extends HTMLDivElement {
|
|||
return next;
|
||||
}
|
||||
turnOver(bool) {
|
||||
if (typeof bool == 'boolean') {
|
||||
if (bool) {
|
||||
if (this.isTurnedOver()) return;
|
||||
}
|
||||
else {
|
||||
if (!this.isTurnedOver()) return;
|
||||
}
|
||||
}
|
||||
var next = game.createEvent('turnOver');
|
||||
next.player = this;
|
||||
next.includeOut = true;
|
||||
next.setContent('turnOver');
|
||||
if (typeof bool == 'boolean') {
|
||||
if (bool) {
|
||||
if (this.isTurnedOver()){
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!this.isTurnedOver()){
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
}
|
||||
}
|
||||
return next;
|
||||
}
|
||||
out(skill) {
|
||||
|
@ -6483,17 +6491,23 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
}
|
||||
link(bool) {
|
||||
if (typeof bool == 'boolean') {
|
||||
if (bool) {
|
||||
if (this.isLinked()) return;
|
||||
}
|
||||
else {
|
||||
if (!this.isLinked()) return;
|
||||
}
|
||||
}
|
||||
var next = game.createEvent('link');
|
||||
next.player = this;
|
||||
next.setContent('link');
|
||||
if (typeof bool == 'boolean') {
|
||||
if (bool) {
|
||||
if (this.isLinked()){
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!this.isLinked()){
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
}
|
||||
}
|
||||
return next;
|
||||
}
|
||||
skip(name) {
|
||||
|
@ -7377,11 +7391,14 @@ export class Player extends HTMLDivElement {
|
|||
return next;
|
||||
}
|
||||
exitSubPlayer(remove) {
|
||||
if (!this.hasSkill('subplayer')) return;
|
||||
var next = game.createEvent('exitSubPlayer');
|
||||
next.player = this;
|
||||
next.remove = remove;
|
||||
next.setContent('exitSubPlayer');
|
||||
if (!this.hasSkill('subplayer')) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
return next;
|
||||
}
|
||||
getSubPlayers(tag) {
|
||||
|
|
Loading…
Reference in New Issue