74 override bool CanDo(
ItemBase ingredients[], PlayerBase player)
77 Class.CastTo(crate, ingredients[0]);
79 if ( crate.GetInventory().CountInventory() > 1 )
85 override void Do(
ItemBase ingredients[], PlayerBase player,array<ItemBase> results,
float specialty_weight)
88 Class.CastTo(crate, ingredients[0]);
89 int hp = crate.GetHealthLevel(
"");
93 case GameConstants.STATE_PRISTINE:
94 results[0].SetQuantity(Math.RandomIntInclusive( 6, 8 ));
95 results[0].SetHealth( results[0].GetMaxHealth() * Math.RandomFloat( 0.6, 0.8 ));
96 results[1].SetQuantity(Math.RandomIntInclusive( 12, 16 ));
97 results[1].SetHealth( results[1].GetMaxHealth() * Math.RandomFloat( 0.6, 0.8 ));
100 case GameConstants.STATE_WORN:
101 results[0].SetQuantity(Math.RandomIntInclusive( 5, 7 ));
102 results[0].SetHealth( results[0].GetMaxHealth() * Math.RandomFloat( 0.5, 0.8 ));
103 results[1].SetQuantity(Math.RandomIntInclusive( 9, 13 ));
104 results[1].SetHealth( results[1].GetMaxHealth() * Math.RandomFloat( 0.5, 0.8 ));
107 case GameConstants.STATE_DAMAGED:
108 results[0].SetQuantity(Math.RandomIntInclusive( 4, 6 ));
109 results[0].SetHealth( results[0].GetMaxHealth() * Math.RandomFloat( 0.3, 0.6 ));
110 results[1].SetQuantity(Math.RandomIntInclusive( 6, 10 ));
111 results[1].SetHealth( results[1].GetMaxHealth() * Math.RandomFloat( 0.3, 0.6 ));
114 case GameConstants.STATE_BADLY_DAMAGED:
115 results[0].SetQuantity(Math.RandomIntInclusive( 3, 5 ));
116 results[0].SetHealth( results[0].GetMaxHealth() * Math.RandomFloat( 0.1, 0.3 ));
117 results[1].SetQuantity(Math.RandomIntInclusive( 3, 7 ));
118 results[1].SetHealth( results[1].GetMaxHealth() * Math.RandomFloat( 0.1, 0.3 ));
122 case GameConstants.STATE_RUINED:
123 results[0].SetQuantity(Math.RandomIntInclusive( 1, 2 ));
124 results[0].SetHealth( results[0].GetMaxHealth() * Math.RandomFloat( 0.05, 0.2 ));
125 results[1].SetQuantity(Math.RandomIntInclusive( 1, 4 ));
126 results[1].SetHealth( results[1].GetMaxHealth() * Math.RandomFloat( 0.05, 0.2 ));
130 results[0].SetQuantity(Math.RandomIntInclusive( 1, 2 ));
131 results[0].SetHealth( results[0].GetMaxHealth() * Math.RandomFloat( 0.05, 0.2 ));
132 results[1].SetQuantity(Math.RandomIntInclusive( 1, 4 ));
133 results[1].SetHealth( results[1].GetMaxHealth() * Math.RandomFloat( 0.05, 0.2 ));
class GP5GasMask extends MaskBase ItemBase
int m_ResultReplacesIngredient[MAXIMUM_RESULTS]
int m_ResultToInventory[MAXIMUM_RESULTS]
bool m_IngredientUseSoftSkills[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddHealth[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientSetHealth[MAX_NUMBER_OF_INGREDIENTS]
int m_ResultInheritsHealth[MAXIMUM_RESULTS]
void AddResult(string item)
int m_ResultInheritsColor[MAXIMUM_RESULTS]
float m_MinDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_MaxQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_ResultSetQuantity[MAXIMUM_RESULTS]
bool m_ResultSetFullQuantity[MAXIMUM_RESULTS]
void InsertIngredient(int index, string ingredient, DayZPlayerConstants uid=BASE_CRAFT_ANIMATION_ID, bool showItem=false)
float m_ResultSetHealth[MAXIMUM_RESULTS]
float m_MaxDamageIngredient[MAX_NUMBER_OF_INGREDIENTS]
float m_IngredientAddQuantity[MAX_NUMBER_OF_INGREDIENTS]
float m_MinQuantityIngredient[MAX_NUMBER_OF_INGREDIENTS]
bool m_IngredientDestroy[MAX_NUMBER_OF_INGREDIENTS]
bool m_ResultUseSoftSkills[MAXIMUM_RESULTS]
bool CanDo(PlayerBase player, TStringVectorMap surfaceTypes)
void Do(PlayerBase player)