pappde / bmai

AI to play Button Men, originally developed to interface with the (now deprecated) unofficial online Button Men website.
MIT License
2 stars 1 forks source link

enhance morphing to be allowed on speed, turbo, twin #66

Open danlangford opened 3 weeks ago

danlangford commented 3 weeks ago

morphing should be allowed on speed, turbo , and twin dice (whoops links like a partial duplication with #41 )

Morphing: m

When a Morphing Die is used in any attack against a single target die, it changes size, becoming the same size as the die that was captured. It is then re-rolled. Morphing Dice change size every time they capture another die. If a Morphing die is captured, its scoring value is based on its size at the time of capture; likewise, if it is not captured during a round, its scoring value is based on its size at the end of the round

Interaction with Radioactive: Dice with both Radioactive and Morphing skills first morph into the size of the captured die, and then decay

the description of morphing dont indicate that there is any reason it can't be on speed, turbo, or twin dice

some of the behavior in question is asserted in the code

// verification

// MORPHING shouldn't be allowed to SPEED
BM_ERROR( !HasProperty(BME_PROPERTY_MORPHING) || !m_attacks.IsSet(BME_ATTACK_SPEED) );

// MORPHING shouldn't be paired with TURBO
BM_ERROR( (m_properties & (BME_PROPERTY_MORPHING|BME_PROPERTY_TURBO)) != (BME_PROPERTY_MORPHING|BME_PROPERTY_TURBO) );

// MORPHING shouldn't be paired with TWIN
BM_ERROR( (m_properties & (BME_PROPERTY_MORPHING|BME_PROPERTY_TWIN)) != (BME_PROPERTY_MORPHING|BME_PROPERTY_TWIN) );
pappde commented 3 weeks ago

This actually is flagged more clearly as an unresolved issue in the code comments under resolved "QUESTIONS"

// - MORPHING SPEED/BERSERK or TURBO works? (not allowing)

I believe the "BM_ERROR" checks are misleading. Rather than indicating "should not be allowed", they really mean "not supported or tested, but can be implemented if needed".

However, I think the question is: if those checks are removed, will these combinations with Morphing just work, or are code updates needed?

ASIDE Following is the full list from bmai.cpp. It might be worth looking through these to see if they are still valid, related to open issues, or pointing out issues not identified yet otherwise.

// QUESTIONS (can test?)
// - reset SWING/OPTION in a TIE?  RESERVE in a TIE? [normally no - site allows changing swing after 3 ties]
// - allowing skill only with 2 dice, but speed/berserk with 1. [skill is allowed with 1]
// - for TIME AND SPACE, works if *either* dice in a twin is odd?  
// - rules for MOOD SWING on 'U'?  or is MOOD SWING on X/V also uniform dist?
// - INITIATIVE: handle ties? [currently gives to player 0]
// - ORNERY causes MIGHTY(y)/WEAK(y)/MOOD(y)/TURBO(y)?
// - CHANCE causes ?Hh!? (assuming no)
// - MORPHING SPEED/BERSERK or TURBO works? (not allowing)
// - MORPHING MIGHTY/WEAK order? (applying morphing after)
// - WARRIOR: worth 0 when has skill, still worth 0 once loses? (assuming no)
// - KONSTANT: reroll on trip?

RELATED ISSUES