keep-starknet-strange / tsubasa

Tsubasa onchain game built with Dojo, running on a Starknet Appchain.
https://play.tsubasa.win
MIT License
59 stars 30 forks source link

Implement the attack logic #26 #57

Open WhoIsNac opened 1 year ago

WhoIsNac commented 1 year ago

attack _system

✅ We check if the player is an Attacker ✅ If the attacker has more dribbling status than the defender, we reduce the attacker's defense by the defender dribble stats. ✅ Create_card system crated (only cost and role param missing) ✅ Attack_system update with the place_card logic. ✅ When the card has been dribbled, we remove the card from the field according to its position ✅If the Attacker has not dribbled the opposing card , we remove the Attacker from the field + end of the turn. ✅ Added 1st review change.

I started the attack logic and the contract and implemented the test, (I also created a card creation contract to do the test with the card stats).

But to finish the implementation, we need to finish the card logic system and also the place_card system to know each card in the field in order to start the attack sequence.

I've also created a create_card contract so that I can test attacks between two cards.

Fixes #26

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsubasa ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 24, 2023 8:28pm
WhoIsNac commented 1 year ago

Review Implemented.

Attack_system/test update with the place_card logic .

When the card has been dribbled, we remove the card from the field according to its position

If the Attacker has not dribbled the opposing card , we remove the Attacker from the field + end of the turn.

WhoIsNac commented 1 year ago

Sry wrong manipulation

rkdud007 commented 1 year ago

Hi, I thought attack_system contains updating the score of players when they score a goal. Current code seems not containing. Can you check? @WhoIsNac @LucasLvy

vercel[bot] commented 1 year ago

@WhoIsNac is attempting to deploy a commit to the keep-starknet-strange Team on Vercel.

A member of the Team first needs to authorize it.