Commit d3f19391 authored by Chunchi Che's avatar Chunchi Che

add becomeTarget service

parent 3c7c029e
Pipeline #22209 passed with stages
in 13 minutes and 35 seconds
......@@ -225,5 +225,15 @@
"repeatedType":"CardInfo"
}
]
},
"83":{
"protoType":"become_target",
"fields":[
{
"fieldName":"locations",
"fieldType":"repeated",
"repeatedType":"CardLocation"
}
]
}
}
......@@ -34,6 +34,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
["chain_end", ygopro.StocGameMessage.MsgChainEnd],
["lp_update", ygopro.StocGameMessage.MsgLpUpdate],
["confirm_cards", ygopro.StocGameMessage.MsgConfirmCards],
["become_target", ygopro.StocGameMessage.MsgBecomeTarget],
]);
export interface penetrateType {
......
import { ygopro } from "@/api";
export default (becomeTarget: ygopro.StocGameMessage.MsgBecomeTarget) => {
console.log(becomeTarget);
};
......@@ -5,6 +5,7 @@ import { matStore } from "@/stores";
import onAnnounce from "./announce";
import onMsgAttack from "./attack";
import onMsgAttackDisable from "./attackDisable";
import onMsgBecomeTarget from "./becomeTarget";
import onMsgChainEnd from "./chainEnd";
import onMsgChaining from "./chaining";
import onMsgChainSolved from "./chainSolved";
......@@ -297,6 +298,11 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break;
}
case "become_target": {
onMsgBecomeTarget(msg.become_target);
break;
}
case "unimplemented": {
onUnimplemented(msg.unimplemented);
......
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