DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

26c7e2e1971226056e01339631eb6b9f2d488e6e — Jonni Liljamo 1 year, 5 months ago d3d01bc
feat(client): update test card and cardaction type
2 files changed, 7 insertions(+), 9 deletions(-)

M client/src/game_status/mod.rs
M client/src/plugins/game/ui/mod.rs
M client/src/game_status/mod.rs => client/src/game_status/mod.rs +0 -2
@@ 16,9 16,7 @@ mod parser;

#[derive(Deserialize, Serialize, Clone, PartialEq)]
pub struct CardAction {
    pub target: String,
    pub command: Command,
    pub seed: u64,
}

#[derive(Deserialize, Serialize, Clone, PartialEq)]

M client/src/plugins/game/ui/mod.rs => client/src/plugins/game/ui/mod.rs +7 -7
@@ 11,7 11,7 @@ use bevy_egui::{egui, EguiContexts};

use crate::{
    api::game::{Action, Command, Game},
    game_status::{Card, PlayerState},
    game_status::{Card, CardAction, PlayerState},
    plugins::GameActionCreateCallEvent,
    seed_gen, AppState, Global,
};


@@ 438,11 438,13 @@ fn hardcoded_init(game: &Game, create_action_ev_w: &mut EventWriter<GameActionCr
            &game.host_id,
            &Command::InitSupplyPile {
                card: Card {
                    name: "Test Card 2".to_string(),
                    short_details: vec![],
                    name: "Gib Möney".to_string(),
                    short_details: vec!["Roll 1d6 for currency".to_string()],
                    long_details: vec![],
                    cost: 0,
                    actions: vec![],
                    actions: vec![CardAction {
                        command: Command::RollForCurrency { min: 1, max: 6 },
                    }],
                },
                amount: 10,
            },


@@ 492,9 494,7 @@ fn hardcoded_init(game: &Game, create_action_ev_w: &mut EventWriter<GameActionCr
            &game.id,
            &game.host_id,
            &game.host_id,
            &Command::ChangePlayerState {
                state: PlayerState::PlayPhase,
            },
            &Command::StartTurn {},
            seed_gen!(),
        ),
    });