Commit 8e322240 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'feat/shuffle_deck' into 'main'

Feat/shuffle deck

See merge request !233
parents b23c5ab2 4056b3c8
Pipeline #22351 passed with stages
in 16 minutes and 29 seconds
neos-protobuf @ 975e4a81
Subproject commit 984aa1c40cee961f2a0f4540eaae7bc9d8d907a2
Subproject commit 975e4a815f7fc394247f5af6ccb22a0742379f33
This diff is collapsed.
......@@ -235,5 +235,14 @@
"repeatedType":"CardLocation"
}
]
},
"32":{
"protoType":"shuffle_deck",
"fields":[
{
"fieldName":"player",
"fieldType":"uint8"
}
]
}
}
......@@ -35,6 +35,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
["lp_update", ygopro.StocGameMessage.MsgLpUpdate],
["confirm_cards", ygopro.StocGameMessage.MsgConfirmCards],
["become_target", ygopro.StocGameMessage.MsgBecomeTarget],
["shuffle_deck", ygopro.StocGameMessage.MsgShuffleDeck],
]);
export interface penetrateType {
......
......@@ -35,6 +35,7 @@ import onMsgSelectTribute from "./selectTribute";
import onMsgSelectUnselectCard from "./selectUnselectCard";
import onMsgSelectYesNo from "./selectYesNo";
import onMsgSet from "./set";
import onMsgShuffleDeck from "./shuffleDeck";
import onMsgShuffleHand from "./shuffleHand";
import onMsgShuffleSetCard from "./shuffleSetCard";
import onMsgSortCard from "./sortCard";
......@@ -321,6 +322,11 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break;
}
case "shuffle_deck": {
onMsgShuffleDeck(msg.shuffle_deck);
break;
}
case "unimplemented": {
onUnimplemented(msg.unimplemented);
......
import { ygopro } from "@/api";
import { cardStore } from "@/stores";
export default (shuffleDeck: ygopro.StocGameMessage.MsgShuffleDeck) => {
const player = shuffleDeck.player;
for (const card of cardStore.at(ygopro.CardZone.DECK, player)) {
// 把数据抹掉就好了
card.code = 0;
card.meta = { id: 0, data: {}, text: {} };
}
};
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