document Ep3 assist AI parameters

This commit is contained in:
Martin Michelsen
2023-09-01 18:52:29 -07:00
parent 8449a6d21a
commit 85dbea215b
3 changed files with 110 additions and 65 deletions
+45 -42
View File
@@ -518,24 +518,27 @@ struct CardDefinition {
/* 0091 */ uint8_t cannot_drop;
/* 0092 */ CriterionCode usable_criterion;
/* 0093 */ CardRarity rarity;
/* 0094 */ be_uint16_t unknown_a2;
/* 0094 */ be_uint16_t unused4;
// The card class is used for checking attributes (e.g. item types). It's
// stored big-endian here, so there's a helper function (card_class()) that
// returns a usable CardClass enum value.
/* 0096 */ be_uint16_t be_card_class;
// The two fields of this array seem to always contain the same value, and
// are always 0 for non-assist cards and nonzero for assists. Each assist
// card has a unique value here and no effects, though the server ignores
// these values - assist effects are hardcoded based on the card ID instead.
// There seems to be some 1k-modulation going on here; most cards have values
// here in the range 101-174 but a few have e.g. 1150, 2141. A few pairs of
// cards have the same effect, so this cannot be used by the server anyway to
// determine assist cards' effects (see e.g. Skip Draw / Skip Move, Dice
// Fever / Dice Fever +, Reverse Card / Rich +).
/* 0098 */ parray<be_uint16_t, 2> assist_effect;
// If this card is an assist card, this field controls how COM players handle
// playing it. (This field is ignored for other card types.) This integer
// encodes the following fields:
// - assist_ai_params % 100 (that is, the two lowest decimal places) appears
// to specify the effect, though a few unrelated cards share values in this
// field. It's not yet known how exactly this is used by the COM logic.
// - (assist_ai_params / 100) % 10 specifies the priority. It appears the COM
// logic always chooses the assist card with the highest value in this field
// if there are multiple cards to consider.
// - (assist_ai_params / 1000) % 10 specifies on who the assist card may be
// played (0 = any player, 1 = self, 2 = self or ally, 3 = enemy only).
/* 0098 */ be_uint16_t assist_ai_params;
/* 009A */ be_uint16_t unused5;
// Drop rates are decimal-encoded with the following fields:
// Drop rates are integers which encode the following data:
// - rate % 10 (that is, the lowest decimal place) specifies the required game
// mode. 0 means any mode, 1 means offline story mode, 2 means 1P free
// battle, 3 means 2P+ free battle (specifically, PvP - two humans vs. two
@@ -568,40 +571,40 @@ struct CardDefinition {
// Finally, cards are chosen from the buckets with a weighted distribution
// according to these tables (row is player's level class, column is card's
// rarity class):
// Offline
// 1 2 3 4 5 6 7 8 9 10
// 1 => 8000 2000 50
// 2 => 6000 3500 500 50
// 3 => 4500 3500 1500 400 100
// 4 => 3000 3000 2500 1000 450 50
// 5 => 2000 2600 2750 2000 500 100 50
// 6 => 1900 2200 2500 2100 830 350 100 20
// 7 => 1900 2000 2000 2000 1000 500 500 100
// 8 => 160000 160000 190000 190000 130000 100000 50000 19999 1
// 9 => 120000 120000 150000 160000 150000 150000 100000 49989 10 1
// 10 => 120000 120000 130000 150000 160000 150000 100000 69965 30 5
// Offline:
// LC | RC = 0 1 2 3 4 5 6 7 8 9
// 1 | 8000 2000 50
// 2 | 6000 3500 500 50
// 3 | 4500 3500 1500 400 100
// 4 | 3000 3000 2500 1000 450 50
// 5 | 2000 2600 2750 2000 500 100 50
// 6 | 1900 2200 2500 2100 830 350 100 20
// 7 | 1900 2000 2000 2000 1000 500 500 100
// 8 | 160000 160000 190000 190000 130000 100000 50000 19999 1
// 9 | 120000 120000 150000 160000 150000 150000 100000 49989 10 1
// 10 | 120000 120000 130000 150000 160000 150000 100000 69965 30 5
// Online
// 1 2 3 4 5 6 7 8 9 10
// 1 => 8000 2000 50
// 2 => 6000 3500 500 20
// 3 => 4500 4000 1500 200
// 4 => 3500 3500 2300 700 20
// 5 => 2700 2800 2500 1500 500 10
// 6 => 2300 2300 2300 1900 900 300 1
// 7 => 1995 2100 2100 2100 1000 700 5
// 8 => 1789 2100 2100 2100 1100 800 10 1
// 9 => 14620 20000 21000 22000 13000 9000 300 80
// 10 => 133997 190000 200000 200000 150000 120000 5000 1000 2 1
// LC | RC = 0 1 2 3 4 5 6 7 8 9
// 1 | 8000 2000 50
// 2 | 6000 3500 500 20
// 3 | 4500 4000 1500 200
// 4 | 3500 3500 2300 700 20
// 5 | 2700 2800 2500 1500 500 10
// 6 | 2300 2300 2300 1900 900 300 1
// 7 | 1995 2100 2100 2100 1000 700 5
// 8 | 1789 2100 2100 2100 1100 800 10 1
// 9 | 14620 20000 21000 22000 13000 9000 300 80
// 10 | 133997 190000 200000 200000 150000 120000 5000 1000 2 1
// These values are all relative to other values in the same row. For example,
// if your character is in level class 1, you'll get cards of rarity class 1
// about 80% of the time, cards of rarity class 2 about 20% of the time, and
// cards of rarity class 3 about 0.5% of the time. (The actual probabilities
// if your character is in level class 1, you'll get cards of rarity class 0
// about 80% of the time, cards of rarity class 1 about 20% of the time, and
// cards of rarity class 2 about 0.5% of the time. (The actual probabilities
// are 8000/10050, 2000/10050, and 50/10050.)
// The drop rates are completely ignored if any of the following are true
// (which means the card can never be found in a normal post-battle draw):
// The drop rates for a card are completely ignored if any of the following
// are true (which means it can never be found in a normal post-battle draw):
// - type is SC_HUNTERS or SC_ARKZ
// - card_class is BOSS_ATTACK_ACTION (0x23) or BOSS_TECH (0x24)
// - rarity is E, D1, D2, or INVIS
// - rarity is E, D1, or D2
// - cannot_drop is 1 (specifically 1; other nonzero values here don't
// prevent the card from appearing in post-battle draws)
/* 009C */ parray<be_uint16_t, 2> drop_rates;
@@ -610,7 +613,7 @@ struct CardDefinition {
/* 00B4 */ ptext<char, 0x0B> jp_short_name;
/* 00BF */ ptext<char, 0x08> en_short_name;
/* 00C7 */ parray<Effect, 3> effects;
/* 0127 */ uint8_t unused4;
/* 0127 */ uint8_t unused6;
/* 0128 */
bool is_sc() const;