Commit e53123ee authored by Chunchi Che's avatar Chunchi Che

fix

parent b15537c1
......@@ -74,7 +74,8 @@
},
"commonDelay": 200,
"moveDelay": 500,
"chainingDelay": 800
"chainingDelay": 800,
"attackDelay": 500
},
"unimplementedWhiteList":[
1,
......
......@@ -74,7 +74,8 @@
},
"commonDelay": 200,
"moveDelay": 500,
"chainingDelay": 800
"chainingDelay": 800,
"attackDelay": 500
},
"unimplementedWhiteList":[
1,
......
......@@ -26,7 +26,7 @@ export default (attack: ygopro.StocGameMessage.MsgAttack) => {
if (target) {
attacker.attackTarget = {
sequence: attack.target_location.sequence,
opponent: matStore.isMe(attack.target_location.controler),
opponent: !matStore.isMe(attack.target_location.controler),
...target,
};
......
......@@ -127,7 +127,7 @@ function handleDelay(stoc: ygopro.YgoStocMsg): number {
} else if (stoc.stoc_game_msg.gameMsg == "chaining") {
matStore.delay = NeosConfig.ui.chainingDelay;
} 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 {
}
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) {
switch (state.location.zone) {
......@@ -185,6 +188,10 @@ function cardStateToRow(state: RenderCard): number {
function cardStateToCol(state: RenderCard): number {
if (state.focus) return 2;
if (state.attackTarget) {
// 正在攻击对方怪兽
return cardStateToCol(state.attackTarget);
}
if (state.opponent) {
switch (state.location.zone) {
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