@@ -27,12 +27,15 @@ def is_excluded_accessible(template_name: str):
2727 no = [
2828 'sh_w_f_g_c_t_s_avg_deathknight_monster' ,
2929 'tongs' ,
30+ 'blacksmith_hammer' ,
3031 'sh_un_m_o_r_m_turtle_dsx' ,
3132 'sh_un_m_o_r_m_turtle_01_dsx' ,
3233 'sh_un_m_o_r_m_turtle_02_dsx' ,
3334 'sh_un_m_o_k_m_dermal_dsx' ,
3435 'dsx_minigun_gas_monster' ,
3536 'minigun_magic_missles' ,
37+ 'sd_g_c_dsx_kat_1h_shadowjumper_NIS_ONLY' ,
38+ 'torch_small' ,
3639 ]
3740 if template_name in yes :
3841 return True
@@ -73,6 +76,8 @@ def __init__(self, template: Template, is_dsx: bool):
7376 self .weapon_kind = 'melee' if template .is_descendant_of ('weapon_melee' ) else 'ranged' if template .is_descendant_of ('weapon_ranged' ) else None
7477
7578 self .world_level , self .armor_type , self .weapon_type , self .rarity , self .material , self .tn_stance = self .parse_template_name (self .template_name )
79+ if self .template_name == 'dsx_gobbot_grenade_launcher' :
80+ self .weapon_type = 'minigun' # sigh
7681
7782 variant_sections = get_pcontent_variants (template )
7883 self .variants = [s .header for s in variant_sections ]
@@ -102,6 +107,9 @@ def __init__(self, template: Template, is_dsx: bool):
102107 can_sell = template .compute_value ('gui' , 'can_sell' )
103108 self .can_sell = True if can_sell is None else can_sell .lower () == 'true'
104109
110+ tn_segs = self .template_name .split ('_' )
111+ self .tn_red_flag = 'temp' in tn_segs or 'NIS' in tn_segs
112+
105113 def decide_stance (self ):
106114 # if sth requires dex or int, it's for rangers / mages
107115 if self .req_stat == 'dex' :
@@ -140,6 +148,8 @@ def decide_scm_shop(self):
140148 return 'x_excluded'
141149 if not self .can_sell :
142150 return 'x_excluded'
151+ if self .tn_red_flag :
152+ return 'x_excluded'
143153
144154 if self .item_set :
145155 return 'loa_any_sets'
@@ -148,8 +158,6 @@ def decide_scm_shop(self):
148158 stance = self .decide_stance () or 'any'
149159 eq_type = self .equipment_type
150160 shop_type = self .armor_type if eq_type == 'armor' else self .weapon_type if eq_type == 'weapon' else None
151- if self .is_2h and shop_type is not None :
152- shop_type += '2h'
153161 rarity = 'ru' if self .rarity or not self .is_pcontent_allowed else None # shops are only either normal or special
154162
155163 # combine shops to reasonable sizes
@@ -163,13 +171,19 @@ def decide_scm_shop(self):
163171 if stance == 'r' and rarity == 'ru' and shop_type != 'sh' :
164172 shop_type = 'amr' # combine all special ranger armors
165173 if eq_type == 'weapon' :
174+ if self .is_2h and self .weapon_kind == 'melee' and shop_type != 'st' :
175+ shop_type = '2h'
176+ if shop_type == 'scythe' :
177+ shop_type = 'ax'
166178 if v == 'loa' and shop_type in ['cb' , 'dg' , 'hm' , 'mc' ]:
167179 shop_type = 'cdhm' # combine minor melee weapon types
168180 if v == 'v' and shop_type in ['db' , 'dg' , 'hm' ]:
169181 shop_type = 'cdh' # in vanilla there are enough maces to warrant a separate shop
170182 if shop_type in ['cw' , 'minigun' ]:
171183 shop_type = 'cm'
172184 rarity = None
185+ if v == 'loa' and stance in ['r' , 'm' ]:
186+ rarity = None
173187 if stance == 'any' :
174188 # general store: all-in-one
175189 v = 'x' # even vanilla & loa
@@ -187,11 +201,14 @@ def parse_template_name(cls, template_name: str):
187201 if name_parts [0 ].lower () in ['2w' , '3w' ]:
188202 world_level = name_parts .pop (0 ).lower ()
189203
204+ if name_parts [0 ] == 'dsx' :
205+ name_parts .pop (0 )
206+
190207 armor_type = None
191208 if name_parts [0 ] in ['bd' , 'he' , 'bo' , 'gl' , 'sh' ]:
192209 armor_type = name_parts .pop (0 )
193210 weapon_type = None
194- if name_parts [0 ] in ['ax' , 'cb' , 'dg' , 'hm' , 'mc' , 'st' , 'sd' , 'ss' ] or name_parts [0 ] in ['bw' , 'cw' , 'minigun' ]:
211+ if name_parts [0 ] in ['ax' , 'cb' , 'dg' , 'hm' , 'mc' , 'st' , 'sd' , 'ss' , 'scythe' ] or name_parts [0 ] in ['bw' , 'cw' , 'minigun' ]:
195212 weapon_type = name_parts .pop (0 )
196213
197214 rarity = None
@@ -257,7 +274,8 @@ def load_dsx_armor_template_names(bits: Bits) -> list[str]:
257274
258275def load_armor_templates (bits : Bits ) -> tuple [list [str ], list [Template ]]:
259276 dsx_armor_template_names = load_dsx_armor_template_names (bits )
260- armor_templates = list (bits .templates .get_leaf_templates ('armor' ).values ())
277+ armor_templates = list ()
278+ # armor_templates.extend(bits.templates.get_leaf_templates('armor').values())
261279 armor_templates .extend (bits .templates .get_leaf_templates ('weapon' ).values ())
262280 return dsx_armor_template_names , armor_templates
263281
0 commit comments