Merge pull request #833 from PZ157/PR-Branch

bug修复
This commit is contained in:
Spmario233 2024-01-21 23:18:01 +08:00 committed by GitHub
commit b592ec1dac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 31 additions and 31 deletions

View File

@ -6061,7 +6061,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
onremove:function(player){ onremove:function(player){
game.countPlayer2(current=>{ game.countPlayer2(current=>{
if(current.getStorage('dawu2').includes(player)){ if(current.getStorage('dawu2').includes(player)){
current.unmarkAuto('dawu2',player); current.unmarkAuto('dawu2',[player]);
current.removeAdditionalSkill(`dawu_${player.playerid}`); current.removeAdditionalSkill(`dawu_${player.playerid}`);
} }
},true); },true);

View File

@ -6188,7 +6188,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseCard('he',get.prompt('twxingwu'),'将一张牌置于武将牌上作为“星舞”').set('ai',function(card){ player.chooseCard('he',get.prompt('twxingwu'),'将一张牌置于武将牌上作为“星舞”').set('ai',function(card){
if(_status.event.goon) return 20-get.value(card); if(_status.event.goon) return 20-get.value(card);
return 7-get.value(card); return 7-get.value(card);
}).set('goon',player.needsToDiscard()||player.getStorage('twxingwu').length>1); }).set('goon',player.needsToDiscard()||player.getExpansions('twxingwu').length>1);
'step 1' 'step 1'
if(result.bool){ if(result.bool){
player.logSkill('twxingwu'); player.logSkill('twxingwu');

View File

@ -12,11 +12,11 @@ export class Get extends Uninstantable {
static is = Is; static is = Is;
/** /**
* 获取当前内核版本信息 * 获取当前内核版本信息
* *
* 目前仅考虑`chrome`, `firefox``safari`三种浏览器的信息其余均归于其他范畴 * 目前仅考虑`chrome`, `firefox``safari`三种浏览器的信息其余均归于其他范畴
* *
* > 其他后续或许会增加`IE`永无可能 * > 其他后续或许会增加`IE`永无可能
* *
* @returns {["firefox" | "chrome" | "safari" | "other", number]} * @returns {["firefox" | "chrome" | "safari" | "other", number]}
*/ */
static coreInfo() { static coreInfo() {
@ -79,7 +79,7 @@ export class Get extends Uninstantable {
} }
/** /**
* Generate an object URL from the Base64-encoded octet stream * Generate an object URL from the Base64-encoded octet stream
* *
* 从Base64编码的八位字节流生成对象URL * 从Base64编码的八位字节流生成对象URL
*/ */
static objectURL(octetStream) { static objectURL(octetStream) {
@ -91,7 +91,7 @@ export class Get extends Uninstantable {
} }
/** /**
* Get the card name length * Get the card name length
* *
* 获取此牌的字数 * 获取此牌的字数
*/ */
static cardNameLength(card, player) { static cardNameLength(card, player) {
@ -102,7 +102,7 @@ export class Get extends Uninstantable {
//应变 //应变
/** /**
* Get the Yingbian conditions (of the card) * Get the Yingbian conditions (of the card)
* *
* 获取此牌的应变条件 * 获取此牌的应变条件
*/ */
static yingbianConditions(card) { return get.complexYingbianConditions(card).concat(get.simpleYingbianConditions(card)); } static yingbianConditions(card) { return get.complexYingbianConditions(card).concat(get.simpleYingbianConditions(card)); }
@ -116,7 +116,7 @@ export class Get extends Uninstantable {
} }
/** /**
* Get the Yingbian effects (of the card) * Get the Yingbian effects (of the card)
* *
* 获取此牌的应变效果 * 获取此牌的应变效果
*/ */
static yingbianEffects(card) { static yingbianEffects(card) {
@ -125,7 +125,7 @@ export class Get extends Uninstantable {
} }
/** /**
* Get the default Yingbian effect of the card * Get the default Yingbian effect of the card
* *
* 获取此牌的默认应变效果 * 获取此牌的默认应变效果
*/ */
static defaultYingbianEffect(card) { static defaultYingbianEffect(card) {
@ -154,9 +154,9 @@ export class Get extends Uninstantable {
} }
/** /**
* 新装备栏相关 * 新装备栏相关
* *
* 获取一张装备牌实际占用的装备栏(君曹操六龙) * 获取一张装备牌实际占用的装备栏(君曹操六龙)
* *
* 用法同get.subtype返回数组 * 用法同get.subtype返回数组
*/ */
static subtypes(obj, player) { static subtypes(obj, player) {
@ -506,14 +506,14 @@ export class Get extends Uninstantable {
} }
/** /**
* @overload * @overload
* @param { string } name * @param { string } name
* @returns { Character } * @returns { Character }
*/ */
/** /**
* @template { 0 | 1 | 2 | 3 | 4 } T * @template { 0 | 1 | 2 | 3 | 4 } T
* @overload * @overload
* @param { string } name * @param { string } name
* @param { T } num * @param { T } num
* @returns { Character[T] } * @returns { Character[T] }
*/ */
static character(name, num) { static character(name, num) {
@ -794,9 +794,9 @@ export class Get extends Uninstantable {
} }
/** /**
* 深拷贝函数虽然只处理了部分情况 * 深拷贝函数虽然只处理了部分情况
* *
* 除了普通的Object和NullObject均不考虑自行赋值的数据但会原样将Symbol复制过去 * 除了普通的Object和NullObject均不考虑自行赋值的数据但会原样将Symbol复制过去
* *
* @template T * @template T
* @param {T} obj - 要复制的对象若不是对象则直接返回原值 * @param {T} obj - 要复制的对象若不是对象则直接返回原值
* @param {boolean} [copyKeyDeep = false] - 是否深复制`Map``key` * @param {boolean} [copyKeyDeep = false] - 是否深复制`Map``key`
@ -1586,52 +1586,52 @@ export class Get extends Uninstantable {
*/ */
/** /**
* @overload * @overload
* @param { string } obj * @param { string } obj
* @returns { 'position' | 'natures' | 'nature' } * @returns { 'position' | 'natures' | 'nature' }
*/ */
/** /**
* @overload * @overload
* @param { Player[] } obj * @param { Player[] } obj
* @returns { 'players' } * @returns { 'players' }
*/ */
/** /**
* @overload * @overload
* @param { Card[] } obj * @param { Card[] } obj
* @returns { 'cards' } * @returns { 'cards' }
*/ */
/** /**
* @overload * @overload
* @param { [number, number] } obj * @param { [number, number] } obj
* @returns { 'select' } * @returns { 'select' }
*/ */
/** /**
* @overload * @overload
* @param { [number, number, number, number] } obj * @param { [number, number, number, number] } obj
* @returns { 'divposition' } * @returns { 'divposition' }
*/ */
/** /**
* @overload * @overload
* @param { Button } obj * @param { Button } obj
* @returns { 'button' } * @returns { 'button' }
*/ */
/** /**
* @overload * @overload
* @param { Card } obj * @param { Card } obj
* @returns { 'card' } * @returns { 'card' }
*/ */
/** /**
* @overload * @overload
* @param { Player } obj * @param { Player } obj
* @returns { 'player' } * @returns { 'player' }
*/ */
/** /**
* @overload * @overload
* @param { Dialog } obj * @param { Dialog } obj
* @returns { 'dialog' } * @returns { 'dialog' }
*/ */
/** /**
* @overload * @overload
* @param { GameEvent | GameEventPromise } obj * @param { GameEvent | GameEventPromise } obj
* @returns { 'event' } * @returns { 'event' }
*/ */
static itemtype(obj) { static itemtype(obj) {
@ -1716,7 +1716,7 @@ export class Get extends Uninstantable {
return 0; return 0;
} }
/** /**
* *
* @param {Card | VCard} card * @param {Card | VCard} card
* @param {false | Player} [player] * @param {false | Player} [player]
* @returns {string} * @returns {string}
@ -1736,7 +1736,7 @@ export class Get extends Uninstantable {
* @returns {string} * @returns {string}
*/ */
static suit(card, player) { static suit(card, player) {
if (!card) return; if (typeof card !== 'object') return;
if (Array.isArray(card)) { if (Array.isArray(card)) {
if (card.length == 1) return get.suit(card[0], player); if (card.length == 1) return get.suit(card[0], player);
return 'none'; return 'none';
@ -1761,7 +1761,7 @@ export class Get extends Uninstantable {
* @returns {string} * @returns {string}
*/ */
static color(card, player) { static color(card, player) {
if (!card) return; if (typeof card !== 'object') return;
if (Array.isArray(card)) { if (Array.isArray(card)) {
if (!card.length) return 'none'; if (!card.length) return 'none';
const cards = card.slice(), color = get.color(cards.shift(), player); const cards = card.slice(), color = get.color(cards.shift(), player);
@ -1790,7 +1790,7 @@ export class Get extends Uninstantable {
* @returns {number} * @returns {number}
*/ */
static number(card, player) { static number(card, player) {
if (!card) return; if (typeof card !== 'object') return;
//狗卡你是真敢出啊 //狗卡你是真敢出啊
var number = null; var number = null;
if ('number' in card) { if ('number' in card) {