Commit e53123ee authored by Chunchi Che's avatar Chunchi Che

fix

parent b15537c1
Pipeline #21666 passed with stages
in 14 minutes and 28 seconds
...@@ -74,7 +74,8 @@ ...@@ -74,7 +74,8 @@
}, },
"commonDelay": 200, "commonDelay": 200,
"moveDelay": 500, "moveDelay": 500,
"chainingDelay": 800 "chainingDelay": 800,
"attackDelay": 500
}, },
"unimplementedWhiteList":[ "unimplementedWhiteList":[
1, 1,
......
...@@ -74,7 +74,8 @@ ...@@ -74,7 +74,8 @@
}, },
"commonDelay": 200, "commonDelay": 200,
"moveDelay": 500, "moveDelay": 500,
"chainingDelay": 800 "chainingDelay": 800,
"attackDelay": 500
}, },
"unimplementedWhiteList":[ "unimplementedWhiteList":[
1, 1,
......
...@@ -26,7 +26,7 @@ export default (attack: ygopro.StocGameMessage.MsgAttack) => { ...@@ -26,7 +26,7 @@ export default (attack: ygopro.StocGameMessage.MsgAttack) => {
if (target) { if (target) {
attacker.attackTarget = { attacker.attackTarget = {
sequence: attack.target_location.sequence, sequence: attack.target_location.sequence,
opponent: matStore.isMe(attack.target_location.controler), opponent: !matStore.isMe(attack.target_location.controler),
...target, ...target,
}; };
......
...@@ -127,7 +127,7 @@ function handleDelay(stoc: ygopro.YgoStocMsg): number { ...@@ -127,7 +127,7 @@ function handleDelay(stoc: ygopro.YgoStocMsg): number {
} else if (stoc.stoc_game_msg.gameMsg == "chaining") { } else if (stoc.stoc_game_msg.gameMsg == "chaining") {
matStore.delay = NeosConfig.ui.chainingDelay; matStore.delay = NeosConfig.ui.chainingDelay;
} else if (stoc.stoc_game_msg.gameMsg == "attack") { } else if (stoc.stoc_game_msg.gameMsg == "attack") {
matStore.delay = 500 + 500; matStore.delay = NeosConfig.ui.attackDelay + 200;
} }
} }
......
...@@ -142,7 +142,10 @@ function cardStateToRow(state: RenderCard): number { ...@@ -142,7 +142,10 @@ function cardStateToRow(state: RenderCard): number {
} }
if (state.attackTarget) { if (state.attackTarget) {
// 正在攻击怪兽 // 正在攻击怪兽
return cardStateToRow(state.attackTarget) - 0.5 * (state.opponent ? 1 : -1); return (
cardStateToRow(state.attackTarget) -
0.2 * (state.attackTarget.opponent ? -1 : 1)
);
} }
if (state.opponent) { if (state.opponent) {
switch (state.location.zone) { switch (state.location.zone) {
...@@ -185,6 +188,10 @@ function cardStateToRow(state: RenderCard): number { ...@@ -185,6 +188,10 @@ function cardStateToRow(state: RenderCard): number {
function cardStateToCol(state: RenderCard): number { function cardStateToCol(state: RenderCard): number {
if (state.focus) return 2; if (state.focus) return 2;
if (state.attackTarget) {
// 正在攻击对方怪兽
return cardStateToCol(state.attackTarget);
}
if (state.opponent) { if (state.opponent) {
switch (state.location.zone) { switch (state.location.zone) {
case YgoZone.EXTRA: case YgoZone.EXTRA:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment