This commit is contained in:
parent
d32b4fa95e
commit
d876f5dbf5
|
@ -75,6 +75,7 @@ character.hearth={
|
|||
hs_malfurion:['hs_malorne'],
|
||||
},
|
||||
skill:{
|
||||
hsshenqi_forbid:{},
|
||||
duxin:{
|
||||
trigger:{player:['phaseBegin','phaseEnd']},
|
||||
frequent:true,
|
||||
|
@ -820,12 +821,11 @@ character.hearth={
|
|||
var list=[['','','hsshenqi_morijingxiang'],
|
||||
['','','hsshenqi_kongbusangzhong'],
|
||||
['','','hsshenqi_nengliangzhiguang']];
|
||||
var dialog=ui.create.dialog('邪能:将武将牌翻面并获得一张神器牌',[list,'vcard'],'hidden');
|
||||
var dialog=ui.create.dialog('邪能:选择一张神器牌并获得之',[list,'vcard'],'hidden');
|
||||
player.chooseButton(dialog).ai=function(){return Math.random();};
|
||||
'step 1'
|
||||
if(result.buttons){
|
||||
player.logSkill('xieneng');
|
||||
player.turnOver();
|
||||
player.gain(game.createCard(result.buttons[0].link[2]),'draw');
|
||||
}
|
||||
},
|
||||
|
@ -3954,7 +3954,9 @@ character.hearth={
|
|||
type:'hsshenqi',
|
||||
fullimage:true,
|
||||
vanish:true,
|
||||
enable:true,
|
||||
enable:function(card,player){
|
||||
return !player.hasSkill('hsshenqi_forbid');
|
||||
},
|
||||
derivation:'hs_lafamu',
|
||||
filterTarget:true,
|
||||
content:function(){
|
||||
|
@ -3962,6 +3964,12 @@ character.hearth={
|
|||
target.recover();
|
||||
target.draw(4);
|
||||
},
|
||||
contentAfter:function(){
|
||||
if(!player.isTurnedOver()){
|
||||
player.turnOver();
|
||||
}
|
||||
player.addTempSkill('hsshenqi_forbid','phaseAfter');
|
||||
},
|
||||
ai:{
|
||||
order:5,
|
||||
result:{
|
||||
|
@ -3979,7 +3987,9 @@ character.hearth={
|
|||
type:'hsshenqi',
|
||||
fullimage:true,
|
||||
vanish:true,
|
||||
enable:true,
|
||||
enable:function(card,player){
|
||||
return !player.hasSkill('hsshenqi_forbid');
|
||||
},
|
||||
derivation:'hs_lafamu',
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player;
|
||||
|
@ -3988,6 +3998,12 @@ character.hearth={
|
|||
content:function(){
|
||||
target.damage(Math.ceil(Math.random()*2));
|
||||
},
|
||||
contentAfter:function(){
|
||||
if(!player.isTurnedOver()){
|
||||
player.turnOver();
|
||||
}
|
||||
player.addTempSkill('hsshenqi_forbid','phaseAfter');
|
||||
},
|
||||
ai:{
|
||||
order:9,
|
||||
result:{
|
||||
|
@ -4006,7 +4022,9 @@ character.hearth={
|
|||
type:'hsshenqi',
|
||||
fullimage:true,
|
||||
vanish:true,
|
||||
enable:true,
|
||||
enable:function(card,player){
|
||||
return !player.hasSkill('hsshenqi_forbid');
|
||||
},
|
||||
derivation:'hs_lafamu',
|
||||
filterTarget:function(card,player,target){
|
||||
return target!=player&&target.num('hej')>0;
|
||||
|
@ -4015,6 +4033,12 @@ character.hearth={
|
|||
content:function(){
|
||||
if(target.num('hej')) player.gainPlayerCard(target,'hej',true,Math.ceil(Math.random()*2));
|
||||
},
|
||||
contentAfter:function(){
|
||||
if(!player.isTurnedOver()){
|
||||
player.turnOver();
|
||||
}
|
||||
player.addTempSkill('hsshenqi_forbid','phaseAfter');
|
||||
},
|
||||
ai:{
|
||||
order:9.5,
|
||||
result:{
|
||||
|
@ -4324,7 +4348,7 @@ character.hearth={
|
|||
xunbao2:'寻宝',
|
||||
xunbao_info:'回合开始阶段,若你的武将牌上没有藏宝图,你可以将一张藏宝图置于你的武将牌上;若你的武将牌上有藏宝图,你可以弃置一张与藏宝图点数相同的牌并获得此藏宝图',
|
||||
xieneng:'邪能',
|
||||
xieneng_info:'回合结束阶段,你可以将武将牌翻面,并获得一张神器牌',
|
||||
xieneng_info:'回合结束阶段,你可以选择一张神器牌并获得之',
|
||||
fbeifa:'北伐',
|
||||
fbeifa_info:'每当你失去最后一张手牌,你可以视为使用一张无视距离的杀,若此杀造成伤害,你摸一张牌,每回合最多发动3次',
|
||||
yufa:'驭法',
|
||||
|
@ -4333,11 +4357,11 @@ character.hearth={
|
|||
bingyan_info:'出牌阶段限一次,你可以将一张红色牌当作炽羽袭,或将一张黑色牌当作惊雷闪使用',
|
||||
hsshenqi:'神器',
|
||||
hsshenqi_morijingxiang:'末日镜像',
|
||||
hsshenqi_morijingxiang_info:'从所有其他角色的区域内各获得1~2张牌',
|
||||
hsshenqi_morijingxiang_info:'从所有其他角色的区域内各获得1~2张牌;使用后将武将牌翻至背面且本回合内无法继续使用神器牌',
|
||||
hsshenqi_kongbusangzhong:'恐怖丧钟',
|
||||
hsshenqi_kongbusangzhong_info:'对所有其他角色各造成1~2点伤害',
|
||||
hsshenqi_kongbusangzhong_info:'对所有其他角色各造成1~2点伤害;使用后将武将牌翻至背面且本回合内无法继续使用神器牌',
|
||||
hsshenqi_nengliangzhiguang:'能量之光',
|
||||
hsshenqi_nengliangzhiguang_info:'令一名角色增加一点体力上限,回复一点体力,并摸四张牌',
|
||||
hsshenqi_nengliangzhiguang_info:'令一名角色增加一点体力上限,回复一点体力,并摸四张牌;使用后将武将牌翻至背面且本回合内无法继续使用神器牌',
|
||||
hsbaowu:'宝物',
|
||||
hsbaowu_huangjinyuanhou:'黄金猿猴',
|
||||
hsbaowu_huangjinyuanhou_info:'回复全部体力,弃置所有手牌,并获得等量的无中生有;直到下个回合开始,防上即将受到的一切伤害',
|
||||
|
|
|
@ -5038,6 +5038,7 @@ character.sp={
|
|||
content:function(){
|
||||
"step 0"
|
||||
var target=trigger.player;
|
||||
player.line(target,'green');
|
||||
var judge=trigger.judge(target.judging[0]);
|
||||
var attitude=ai.get.attitude(target,player);
|
||||
target.choosePlayerCard('请选择代替判定的牌','he','visible',true,player).set('ai',function(button){
|
||||
|
@ -5086,7 +5087,7 @@ character.sp={
|
|||
}
|
||||
ui.discardPile.appendChild(trigger.player.judging[0]);
|
||||
trigger.player.judging[0]=event.card;
|
||||
if(!get.owner(result.cards[0],'judge')){
|
||||
if(!get.owner(event.card,'judge')){
|
||||
trigger.position.appendChild(event.card);
|
||||
}
|
||||
game.log(trigger.player,'的判定牌改为',event.card);
|
||||
|
|
|
@ -448,6 +448,10 @@ character.yijiang={
|
|||
else{
|
||||
str+=',或取消并弃置'+get.cnNumber(result.cards.length)+'张牌';
|
||||
}
|
||||
if(!trigger.source.storage.huisheng){
|
||||
trigger.source.storage.huisheng=[];
|
||||
}
|
||||
trigger.source.storage.huisheng.push(player);
|
||||
trigger.source.chooseButton([str,result.cards],forced).set('ai',function(button){
|
||||
if(_status.event.goon){
|
||||
return ai.get.value(button.link);
|
||||
|
|
|
@ -28284,6 +28284,7 @@
|
|||
useful:function(card){
|
||||
if(get.position(card)=='j') return -1;
|
||||
if(get.position(card)=='e') return ai.get.equipValue(card);
|
||||
if(!lib.temp) lib.temp={};
|
||||
if(lib.temp[card.name]==undefined) lib.temp[card.name]=[card];
|
||||
else lib.temp[card.name].add(card);
|
||||
var i=lib.temp[card.name].find(card);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
window.noname_update={
|
||||
version:'1.8.15.3',
|
||||
version:'1.8.15.4',
|
||||
changeLog:[
|
||||
'修bug',
|
||||
],
|
||||
|
@ -8,6 +8,8 @@ window.noname_update={
|
|||
'character/sp.js',
|
||||
'character/yxs.js',
|
||||
'character/ow.js',
|
||||
'character/hearth.js',
|
||||
'character/yijiang.js',
|
||||
'game/game.js',
|
||||
'layout/default/layout.css',
|
||||
],
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 120 KiB |
Binary file not shown.
Before Width: | Height: | Size: 120 KiB |
Binary file not shown.
Before Width: | Height: | Size: 120 KiB |
Binary file not shown.
After Width: | Height: | Size: 106 KiB |
Binary file not shown.
After Width: | Height: | Size: 119 KiB |
|
@ -9,6 +9,10 @@
|
|||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.storyscene.removing{
|
||||
pointer-events: none;
|
||||
transform: translateY(500px);
|
||||
}
|
||||
.storyscene.lockscroll{
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
@ -67,6 +71,13 @@
|
|||
.storyscene>.player.scene.startscene{
|
||||
-webkit-animation: scene_start 0.5s;
|
||||
}
|
||||
.player.scene>.menu>.menubutton.enter{
|
||||
position: absolute;
|
||||
top:auto;
|
||||
bottom: 10px;
|
||||
width: 70px;
|
||||
left: calc(50% - 35px);
|
||||
}
|
||||
|
||||
@-webkit-keyframes scene_start{
|
||||
from{
|
||||
|
|
|
@ -4032,24 +4032,32 @@ mode.chess={
|
|||
game.changeCoin(-3);
|
||||
}
|
||||
list.randomSort();
|
||||
_status.event.dialog.close();
|
||||
var dialog=ui.create.dialog('选择出场角色','hidden');
|
||||
_status.event.dialog=dialog;
|
||||
dialog.classList.add('fullwidth');
|
||||
dialog.classList.add('fullheight');
|
||||
dialog.classList.add('fixed');
|
||||
dialog.add('0/'+_status.event.selectButton());
|
||||
dialog.add([list.slice(0,parseInt(get.config('battle_number'))*4+parseInt(get.config('replace_number'))+5),'character']);
|
||||
if(bossbuttons.length){
|
||||
dialog.add('挑战魔王');
|
||||
dialog.add(bosses);
|
||||
}
|
||||
if(jiangebuttons.length){
|
||||
dialog.add('守卫剑阁');
|
||||
dialog.add(jiange);
|
||||
}
|
||||
event.addConfig(dialog);
|
||||
dialog.open();
|
||||
|
||||
var buttons=ui.create.div('.buttons');
|
||||
var node=_status.event.dialog.buttons[0].parentNode;
|
||||
_status.event.dialog.buttons=ui.create.buttons(list.slice(0,parseInt(get.config('battle_number'))*4+parseInt(get.config('replace_number'))+5),'character',buttons);
|
||||
_status.event.dialog.content.insertBefore(buttons,node);
|
||||
buttons.animate('start');
|
||||
node.remove();
|
||||
|
||||
// _status.event.dialog.close();
|
||||
// var dialog=ui.create.dialog('选择出场角色','hidden');
|
||||
// _status.event.dialog=dialog;
|
||||
// dialog.classList.add('fullwidth');
|
||||
// dialog.classList.add('fullheight');
|
||||
// dialog.classList.add('fixed');
|
||||
// dialog.add('0/'+_status.event.selectButton());
|
||||
// dialog.add([list.slice(0,parseInt(get.config('battle_number'))*4+parseInt(get.config('replace_number'))+5),'character']);
|
||||
// if(bossbuttons.length){
|
||||
// dialog.add('挑战魔王');
|
||||
// dialog.add(bosses);
|
||||
// }
|
||||
// if(jiangebuttons.length){
|
||||
// dialog.add('守卫剑阁');
|
||||
// dialog.add(jiange);
|
||||
// }
|
||||
// event.addConfig(dialog);
|
||||
// dialog.open();
|
||||
game.uncheck();
|
||||
game.check();
|
||||
};
|
||||
|
|
145
mode/story.js
145
mode/story.js
|
@ -9,6 +9,28 @@ mode.story={
|
|||
story:{
|
||||
version:1,
|
||||
scene:{
|
||||
connect:{
|
||||
hulaoguan:{
|
||||
name:'虎牢关',
|
||||
to:['middle','east']
|
||||
},
|
||||
huanghedukou:{
|
||||
name:'黄河渡口',
|
||||
to:['east','north']
|
||||
},
|
||||
yanmenguan:{
|
||||
name:'雁门关',
|
||||
to:['north','northwest']
|
||||
},
|
||||
changjiangdukou:{
|
||||
name:'长江渡口',
|
||||
to:['east','southeast']
|
||||
},
|
||||
jiamengguan:{
|
||||
name:'葭萌关',
|
||||
to:['south','southeast']
|
||||
}
|
||||
},
|
||||
middle:{
|
||||
taoyuanxiang:{
|
||||
name:'桃源乡',
|
||||
|
@ -25,15 +47,11 @@ mode.story={
|
|||
xujiacun:{
|
||||
name:'许家村',
|
||||
},
|
||||
xiangyang:{
|
||||
name:'襄阳'
|
||||
},
|
||||
},
|
||||
east:{
|
||||
luoyang:{
|
||||
name:'洛阳'
|
||||
},
|
||||
changan:{
|
||||
name:'长安'
|
||||
},
|
||||
juyang:{
|
||||
name:'雎阳'
|
||||
},
|
||||
|
@ -43,6 +61,9 @@ mode.story={
|
|||
beihai:{
|
||||
name:'北海'
|
||||
},
|
||||
tianshizhong:{
|
||||
name:'天师冢'
|
||||
}
|
||||
},
|
||||
north:{
|
||||
yecheng:{
|
||||
|
@ -60,9 +81,8 @@ mode.story={
|
|||
xieliang:{
|
||||
name:'解良'
|
||||
},
|
||||
huashan:{
|
||||
name:'华山'
|
||||
},
|
||||
},
|
||||
northwest:{
|
||||
wuwei:{
|
||||
name:'武威'
|
||||
},
|
||||
|
@ -72,19 +92,33 @@ mode.story={
|
|||
xiongnu:{
|
||||
name:'匈奴'
|
||||
},
|
||||
huanghedukou:{
|
||||
name:'黄河渡口'
|
||||
}
|
||||
huashan:{
|
||||
name:'华山'
|
||||
},
|
||||
changan:{
|
||||
name:'长安'
|
||||
},
|
||||
},
|
||||
south:{
|
||||
chengdu:{
|
||||
name:'成都'
|
||||
},
|
||||
wulin:{
|
||||
name:'武陵'
|
||||
},
|
||||
nanman:{
|
||||
name:'南蛮'
|
||||
},
|
||||
shanyue:{
|
||||
name:'山越'
|
||||
},
|
||||
changsha:{
|
||||
name:'长沙'
|
||||
},
|
||||
chengdu:{
|
||||
name:'成都'
|
||||
},
|
||||
southeast:{
|
||||
xiangyang:{
|
||||
name:'襄阳'
|
||||
},
|
||||
jianye:{
|
||||
name:'建业'
|
||||
|
@ -95,18 +129,9 @@ mode.story={
|
|||
jiangxia:{
|
||||
name:'江夏'
|
||||
},
|
||||
shanyue:{
|
||||
name:'山越'
|
||||
},
|
||||
nanman:{
|
||||
name:'南蛮'
|
||||
},
|
||||
zhongshan:{
|
||||
name:'钟山'
|
||||
},
|
||||
changjiangdukou:{
|
||||
name:'长江渡口'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -380,7 +405,9 @@ mode.story={
|
|||
save='save1';
|
||||
}
|
||||
if(!lib.storage[save]){
|
||||
lib.storage[save]={};
|
||||
lib.storage[save]={
|
||||
area:'middle'
|
||||
};
|
||||
game.data=lib.storage[save];
|
||||
game.saveData();
|
||||
}
|
||||
|
@ -390,11 +417,14 @@ mode.story={
|
|||
lib.init.css('layout/mode','story');
|
||||
game.delay();
|
||||
'step 1'
|
||||
var scenes={
|
||||
middle:ui.create.div('.storyscene'),
|
||||
north:ui.create.div('.storyscene'),
|
||||
south:ui.create.div('.storyscene',ui.window),
|
||||
};
|
||||
var scenes={};
|
||||
for(var i in lib.story.scene){
|
||||
if(i!='connect'){
|
||||
scenes[i]=ui.create.div('.storyscene')
|
||||
}
|
||||
}
|
||||
game.data.area=game.data.area||'middle';
|
||||
ui.window.appendChild(scenes[game.data.area].animate('start'));
|
||||
var clickScene=function(e){
|
||||
if(this._clicking) return;
|
||||
if(this.classList.contains('flipped')){
|
||||
|
@ -417,11 +447,18 @@ mode.story={
|
|||
if(Math.abs(sceneNode.dx)<20){
|
||||
sceneNode.dx=0;
|
||||
}
|
||||
// else{
|
||||
// console.log(sceneNode.scrollLeft,sceneNode.dx);
|
||||
// if(sceneNode.scrollLeft<20&&sceneNode.dx<0){
|
||||
// console.log(1);
|
||||
// sceneNode.dx=0;
|
||||
// }
|
||||
// }
|
||||
if(!sceneNode.interval&&sceneNode.dx){
|
||||
sceneNode.interval=setInterval(function(){
|
||||
var dx=sceneNode.dx;
|
||||
if(Math.abs(dx)<=2){
|
||||
sceneNode.scrollLeft+=dx;
|
||||
sceneNode.scrollLeft-=dx;
|
||||
clearInterval(sceneNode.interval);
|
||||
delete sceneNode.interval;
|
||||
}
|
||||
|
@ -467,14 +504,38 @@ mode.story={
|
|||
};
|
||||
node.addEventListener('webkitTransitionEnd',onEnd);
|
||||
}
|
||||
var createScene=function(name,position){
|
||||
var scene=lib.story.scene[position][name];
|
||||
var node=ui.create.div('.player.scene',clickScene).animate('start');
|
||||
var switchScene=function(){
|
||||
var to=this.parentNode.to;
|
||||
var current=this.parentNode.parentNode;
|
||||
restoreScene(current,true);
|
||||
current.parentNode.delete();
|
||||
ui.window.appendChild(scenes[to].animate('start'));
|
||||
}
|
||||
var createScene=function(name,position,connect){
|
||||
var scene;
|
||||
if(connect){
|
||||
scene=lib.story.scene.connect[name];
|
||||
}
|
||||
else{
|
||||
scene=lib.story.scene[position][name];
|
||||
}
|
||||
var node=ui.create.div('.player.scene',clickScene);
|
||||
node.style.transform='perspective(1600px) rotateY(-180deg) scale(0.7)';
|
||||
node.name=name;
|
||||
ui.create.div('.avatar',node).setBackground('mode/story/scene/'+name);
|
||||
ui.create.div('.name',node,get.verticalStr(scene.name)).dataset.nature='soilm';
|
||||
node.content=ui.create.div('.menu',node);
|
||||
var content=ui.create.div('.menu',node);
|
||||
node.content=content;
|
||||
if(connect){
|
||||
content.to=scene.to;
|
||||
if(content.to[0]==position){
|
||||
content.to=content.to[1];
|
||||
}
|
||||
else{
|
||||
content.to=content.to[0];
|
||||
}
|
||||
ui.create.div('.menubutton.large.enter','进入',node.content,switchScene);
|
||||
}
|
||||
scenes[position].appendChild(node);
|
||||
return node;
|
||||
}
|
||||
|
@ -484,14 +545,16 @@ mode.story={
|
|||
restoreScene(current);
|
||||
}
|
||||
}
|
||||
for(var i in lib.story.scene.middle){
|
||||
createScene(i,'middle');
|
||||
for(var i in lib.story.scene){
|
||||
if(i=='connect') continue;
|
||||
for(var j in lib.story.scene[i]){
|
||||
createScene(j,i);
|
||||
}
|
||||
}
|
||||
for(var i in lib.story.scene.north){
|
||||
createScene(i,'north');
|
||||
}
|
||||
for(var i in lib.story.scene.south){
|
||||
createScene(i,'south');
|
||||
for(var i in lib.story.scene.connect){
|
||||
for(var j=0;j<lib.story.scene.connect[i].to.length;j++){
|
||||
createScene(i,lib.story.scene.connect[i].to[j],true)
|
||||
}
|
||||
}
|
||||
game.pause();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue