diff --git a/character/diy.js b/character/diy.js
index 10926cbce..dfca91915 100755
--- a/character/diy.js
+++ b/character/diy.js
@@ -19107,6 +19107,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
冈崎汐:['Okazaki','Ushio'],
神山识:['Kamiyama','Shiki'],
佐藤雏:['Satou','Hina'],
+ 篝:['Kagari'],
},
};
});
diff --git a/character/rank.js b/character/rank.js
index e69d74d5f..94b3bc7b2 100644
--- a/character/rank.js
+++ b/character/rank.js
@@ -668,6 +668,7 @@ window.noname_character_rank={
'jsrg_zhangxuan',
'sb_xunyu',
'ol_sb_taishici',
+ 'tianchou',
],
bp:[
'xin_huojun',
@@ -1861,6 +1862,7 @@ window.noname_character_rank={
'caoxian',
],
epic:[
+ 'tianchou',
'star_yuanshao',
'yue_xiaoqiao',
'yue_daqiao',
diff --git a/character/sp.js b/character/sp.js
index 56e24a4ff..51deeebfc 100755
--- a/character/sp.js
+++ b/character/sp.js
@@ -18,7 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_zhongdan:["cuiyan","huangfusong"],
sp_guozhan2:["sp_dongzhuo","liqueguosi","zhangren"],
sp_others:["hanba","caiyang"],
- sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_liwan','ol_liuyan','caoyu','liyi'],
+ sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_liwan','ol_liuyan','caoyu','liyi','tianchou'],
},
},
characterFilter:{
@@ -30,6 +30,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
+ tianchou:['male','qun',4,['olshandao']],
liyi:['male','wu',4,['olchanshuang','olzhanjin']],
caoyu:['male','wei',3,['olgongjie','olxiangxv','olxiangzuo']],
ol_liwan:['female','wei',3,['ollianju','olsilv']],
@@ -203,6 +204,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
luzhi:['male','wei',3,['qingzhong','weijing']]
},
characterIntro:{
+ tianchou:'田畴(169年或170年-214年或216年),字子泰,东汉右北平郡无终人,东汉末年隐士。田畴好文习武。汉初平年间,其受刘虞派遣去长安,呈送指控公孙赞奏章,献帝大悦,封为骑都尉,田畴不受。携诏返回时,刘虞已被公孙所杀,田畴到刘墓祭拜,被公孙所提,不久释放。田畴回故乡后率家族及随从数百人隐居徐无山,致力农桑,数年间增至5000家。制定法条,兴建学校,一时民风良好,乌桓、鲜卑纷纷与其结交。汉建安二十年(207年),曹操北征乌桓,田畴请为向导。上徐无山、出卢龙、过平冈、登白狼堆、至柳城,曹军大胜,封田畴为亭侯,坚辞不受。曹念田功,四次封赏,终不受,乃拜为议郎。建安二十一年(216年),田畴去世。',
liyi:'李异(生卒年不详),三国时期东吴将领。建安末,与谢旌率水陆三千,击破刘备军将领詹晏、陈凤。刘备领兵攻孙权时,李异与陆逊等人屯巫、秭归,为蜀将所破。黄武元年(222年),陆逊破刘备于猇亭,李异追踪蜀军,屯驻南山。清代学者赵一清认为此李异与刘璋部将李异为同一人。',
caoyu:'曹宇(?-278年),字彭祖,沛国谯县(今安徽亳州)人。三国时期魏国宗室,魏武帝曹操与环夫人之子,邓哀王曹冲同母兄弟。太和六年,封为燕王。魏明帝病危,欲以大将军辅政,不果。其子常道乡公曹奂,是魏国末代皇帝,史称魏元帝。晋朝建立后,降封燕公。咸宁四年(278年),曹宇去世。',
zhangyan:'张燕,本姓褚,生卒年不详,常山真定(今河北正定南)人,东汉末年黑山军首领。张燕剽捍,敏捷过人,军中称为“飞燕”。官渡之战时投降曹操,被任命为平北将军,封安国亭侯。死后其子张方袭爵。',
@@ -707,6 +709,57 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
+ //田畴
+ olshandao:{
+ audio:2,
+ enable:'phaseUse',
+ filter(event,player){
+ return game.hasPlayer(target=>lib.skill.olshandao.filterTarget(null,player,target));
+ },
+ filterTarget(card,player,target){
+ return target.countCards('h');
+ },
+ usable:1,
+ selectTarget:[1,Infinity],
+ multitarget:true,
+ multiline:true,
+ async content(event,trigger,player){
+ const wugu=new lib.element.VCard({name:'wugu'});
+ const wanjian=new lib.element.VCard({name:'wanjian'});
+ const targets=game.filterPlayer(target=>{
+ if(target==player) return false;
+ return !event.targets.includes(target)&&player.canUse(wanjian,target,false);
+ }),targetx=event.targets.sortBySeat();
+ let dialog=['将这些角色的各一张牌置于牌堆顶,然后视为对这些角色使用【五谷丰登】'];
+ for(const target of targetx){
+ const name=(target==player?'你':get.translation(target));
+ if(target.countCards('h')){
+ dialog.add('
'+name+'的手牌区
');
+ if(player.hasSkillTag('viewHandcard',null,target,true)||player==target) dialog.push(target.getCards('h'));
+ else dialog.push([target.getCards('h'),'blank']);
+ }
+ if(target.countCards('e')) dialog.addArray([''+name+'的装备区
',target.getCards('e')]);
+ }
+ const {result:{bool,links}}=await player.chooseButton(dialog,event.targets.length,true).set('filterButton',button=>{
+ return !ui.selected.buttons.some(but=>get.owner(but.link)==get.owner(button.link));
+ }).set('ai',button=>1/(get.value(button.link,get.owner(button.link))||0.5));
+ if(bool){
+ const cards=links.sort((a,b)=>targetx.indexOf(get.owner(a))-targetx.indexOf(get.owner(b)));
+ for(const card of cards){
+ const target=get.owner(card);
+ target.$throw(1,1000);
+ await target.lose([card],ui.cardPile,'insert');
+ }
+ const targety=targetx.filter(target=>player.canUse(wugu,target,false));
+ if(targety.length) await player.useCard(wugu,targety,false);
+ if(targets.length) await player.useCard(wanjian,targets,false);
+ }
+ },
+ ai:{
+ order:9,
+ result:{target:1},
+ },
+ },
//李异
olchanshuang:{
audio:2,
@@ -27055,8 +27108,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
olchanshuang:'缠双',
olchanshuang_info:'①出牌阶段限一次,你可以选择一名其他角色。你与其依次选择〖缠双③〗的一项,然后你与其依次执行各自选择的项。②结束阶段,若X大于0,你执行〖缠双③〗的前X项(X为你本回合以任意形式执行过的〖缠双③〗的选项数)。③选项:1.重铸一张牌;2.使用一张【杀】;3.弃置两张牌。',
olzhanjin:'蘸金',
- olzhanjin_guanshi:'贯石斧(蘸金)',
olzhanjin_info:'锁定技,若你有空置的武器栏,则你视为装备【贯石斧】。',
+ tianchou:'田畴',
+ olshandao:'善刀',
+ olshandao_info:'出牌阶段限一次,你可以选择任意名角色,你选择这些角色的各一张牌,依次将这些牌放置到牌堆顶,然后你视为对这些角色使用【五谷丰登】,然后你视为对这些角色外的所有其他角色使用【万箭齐发】。',
sp_tianji:'天极·皇室宗亲',
sp_sibi:'四弼·辅国文曲',
diff --git a/character/yingbian.js b/character/yingbian.js
index d6c2a4efe..2674487c1 100644
--- a/character/yingbian.js
+++ b/character/yingbian.js
@@ -273,12 +273,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
ai:{
- order:function(item,player){
- return 10;
- },
+ order:10,
respondShan:true,
respondSha:true,
- skillTagFilter:function(player,tag){
+ skillTagFilter:function(player,tag,arg){
+ if(arg=='respond') return false;
var hs=player.getCards('h');
if(hs.length!=Math.max(0,hs.length)) return false;
if(hs.length>1){
diff --git a/game/pinyinjs.js b/game/pinyinjs.js
index c1440f852..35d65b117 100644
--- a/game/pinyinjs.js
+++ b/game/pinyinjs.js
@@ -61,6 +61,7 @@ var pinyin_dict_polyphone = {
"安卡": " kǎ",
"卡玛": "kǎ ",
"梼杌": "táo ",
+ "亚煞极": " shà ",
"库特莉亚芙卡": " kǎ",
"露娜": "lù ",
@@ -174,6 +175,10 @@ var pinyin_dict_polyphone = {
"沾露": " lù",
"禁咒": "jìn ",
"挟令": "xié lìng",
+ "七煞": " shà",
+ "冥煞": " shà",
+ "虎煞": " shà",
+ "煞魂": "shà ",
// END
"撒贝宁": "sà ",
"卡比": "kǎ ",
diff --git a/image/character/tianchou.jpg b/image/character/tianchou.jpg
new file mode 100644
index 000000000..b27747fb2
Binary files /dev/null and b/image/character/tianchou.jpg differ
diff --git a/noname/get/index.js b/noname/get/index.js
index c065ff544..9604218ab 100644
--- a/noname/get/index.js
+++ b/noname/get/index.js
@@ -2231,46 +2231,52 @@ export class Get extends Uninstantable {
default: return num.toString();
}
}
- static cnNumber(num, two) {
- if (num == Infinity) return '∞';
- if (typeof num != 'number' && typeof num != 'string') return num;
+ static cnNumber(num, ordinal) {
if (isNaN(num)) return '';
let numStr = num.toString();
+ if (num === 'Infinity') return '∞';
+ if (num === '-Infinity') return '-∞';
if (!/^\d+$/.test(numStr)) return num;
const chars = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
const units = ['', '十', '百', '千'];
if (numStr.length <= 2) {//两位数以下单独处理保证效率
- if (numStr.length == 1) return !two && num == 2 ? '两' : chars[num];
- return (numStr[0] == '1' ? '' : chars[numStr[0]]) + '十' + (numStr[1] == '0' ? '' : chars[numStr[1]]);
+ if (numStr.length === 1) return !ordinal && num === 2 ? '两' : chars[num];
+ return `${numStr[0] === '1' ? '' : chars[numStr[0]]}十${numStr[1] === '0' ? '' : chars[numStr[1]]}`;
}
numStr = numStr.replace(/(?=(\d{4})+$)/g, ',').split(',').filter(Boolean);
- const handleZero = str => str.replace(/零{2,}/g, '零').replace(/零+$/g, '');
+ const handleZero = str => str.replace(/零{2,}/g, '零').replace(/(?<=.+)零+$/g, '');
const _transform = str => {
- if (str === '0000') return '零';
- if (!two && str === '2') return '两';
+ if (str === '2' && !ordinal) return '两';
let result = '';
for (let i = 0; i < str.length; i++) {
- let char = chars[+str[i]];
- const unitIndex = str.length - 1 - i;
- let unit = units[unitIndex];
- if (!two && char === '二' && unitIndex > 1) char = '两';
+ const part = str[str.length - 1 - i];
+ let char = chars[+part];
+ let unit = units[i];
if (char === '零') unit = '';
- result += char + unit;
+ else if (char === '一' && i === 1) char = '';
+ else if (char === '二' && i > 1 && !ordinal) char = '两';
+ result = char + unit + result;
}
result = handleZero(result);
return result;
};
let result = '';
+ let tempYi = '';
for (let i = 0; i < numStr.length; i++) {
- const part = numStr[i];
+ const part = numStr[numStr.length - 1 - i];
let char = _transform(part);
- const unitIndex = numStr.length - 1 - i;
- let unit = unitIndex % 2 ? '万' : '亿'.repeat(unitIndex / 2);
- if (char === '零') unit = '';
- result += char + unit;
+ let unit = '';
+ if (i % 2) {
+ [unit, tempYi] = ['万' + tempYi, ''];
+ if (char === '零') unit = '';
+ } else {
+ unit = '亿'.repeat(i / 2);
+ if (char === '零') [unit, tempYi] = ['', unit];
+ }
+ result = char + unit + result;
}
result = handleZero(result);
return result;
@@ -2867,7 +2873,7 @@ export class Get extends Uninstantable {
return lib.characterInitFilter[node.name](tag) !== false;
});
if(initFilters.length){
- const str = initFilters.reduce((strx, stry) => strx + lib.InitFilter[stry] + '
').slice(0, -4);
+ const str = initFilters.reduce((strx, stry) => strx + lib.InitFilter[stry] + '
', '').slice(0, -4);
uiintro.addText(str);
}
}