Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Value skill #54

Closed
danlangford opened this issue Sep 30, 2024 · 2 comments · Fixed by #68
Closed

Implement Value skill #54

danlangford opened this issue Sep 30, 2024 · 2 comments · Fixed by #68
Labels
Milestone

Comments

@danlangford
Copy link
Collaborator

Value: v
These dice are not scored like normal dice. Instead, a Value Die is scored as if the number of sides it has is equal to the value that it is currently showing. If a Value Die is ever part of an attack, all dice that are captured become Value Dice (i.e. They are scored by the current value they are showing when they are captured, not by their size).

Interaction with Null: Dice with both Null and Value skills are Null

Interaction with Poison: Dice with both Poison and Value skills are Poison dice that score based on the negative of their current value rather than on their number of sides

@pappde
Copy link
Owner

pappde commented Oct 3, 2024

BMC_Die::GetScore() allows easy implementation of the first part. If BME_PROPERTY_VALUE we can return m_value_total instead of m_sides_max.

For the second part, this is related to Null dice. Look at BMC_Game::ApplyAttackNaturePost() and the null_attacker flag. Then either we want to do something like tgt_die->SetState(BME_STATE_VALUE) or tgt_die->Set(BME_PROPERTY_VALUE). The latter seems more appropriate, but need to look closer to make sure it would work.

@pappde pappde added the rules label Oct 3, 2024
@danlangford danlangford added this to the 3.1 milestone Oct 5, 2024
@danlangford
Copy link
Collaborator Author

thanks for pointing me here

so following this Null example through I find

if (null_attacker)
{
	tgt_die->SetState(BME_STATE_NULLIFIED);
}
else
{
	tgt_die->SetState(BME_STATE_CAPTURED);
	attacker->OnDieCaptured(tgt_die);
}

and I went around and around and around thinking to myself "where is the state used?" I never saw where the state was used to change the score to 0. and then it dawned on me that OnDieCaptured() is where the score is increased so by NOT calling that the score is not changed. probably a semantic difference between NOT scoring and scoring 0 points.

so now I think I have what I need to move forward. this was mainly a status update for my own recollection should I get sidetracked for a long time

danlangford added a commit to danlangford/bmai that referenced this issue Nov 5, 2024
@pappde pappde closed this as completed in #68 Nov 5, 2024
@pappde pappde closed this as completed in 1b6472c Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants