Jung commited on
Commit
5d73b9f
·
1 Parent(s): a6f9e3d

add passive filter

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -83,9 +83,12 @@ def display_heroes_from_df(df,display_cols=display_cols, show_df=True):
83
  st.write(f"***{df['name'].values[i]}*** - {df['speed'].values[i]} - {df['class'].values[i]}")
84
  st.write(f'Attack:{df["attack"].values[i]} -- Defence:{df["defense"].values[i]} -- Health:{df["health"].values[i]}')
85
  st.write(f"***{df['skill'].values[i]}***" )
 
86
  st.write(df['effects'].values[i])
87
- # for sp in df['effects'].values[i]:
88
- # st.write(sp)
 
 
89
 
90
  #########################################
91
  ## Helper function for LB/CB stat analysis
@@ -145,7 +148,7 @@ def return_hero_stat(df0, hero_name, lb_choice="None", costume_choice="None"):
145
 
146
  display_cols_0 = ['image', 'name', 'color', 'star', 'class', 'speed',]
147
  display_cols_1 = [] # ['power', 'attack', 'defense', 'health', ] --> to be select base one LB/Costume choice
148
- display_cols_2 = ['Aether Power', 'source', 'family', 'types', 'skill', 'effects']
149
 
150
  prefix = get_prefix(lb_choice, costume_choice)
151
 
@@ -210,6 +213,7 @@ if genre == ':rainbow[Heroes Explorer]':
210
 
211
  special_type_option = st.text_input(label="SpecialSkill Category", value="Hit 3")
212
  special_text_option = st.text_input(label="SpecialSkill Text", value="Dispel")
 
213
  with col2:
214
  st.header("Stat Filters")
215
  st.write("Tips: put the **minimum** att/def/hp stat you want to filter heroes")
@@ -275,6 +279,9 @@ if genre == ':rainbow[Heroes Explorer]':
275
 
276
  if special_text_option != '':
277
  idx_all.append(filter_by_1col(df, 'effects', special_text_option, exact_flag=False))
 
 
 
278
 
279
  #########################################
280
 
 
83
  st.write(f"***{df['name'].values[i]}*** - {df['speed'].values[i]} - {df['class'].values[i]}")
84
  st.write(f'Attack:{df["attack"].values[i]} -- Defence:{df["defense"].values[i]} -- Health:{df["health"].values[i]}')
85
  st.write(f"***{df['skill'].values[i]}***" )
86
+ st.write("\n**Special Skills**")
87
  st.write(df['effects'].values[i])
88
+
89
+ if df['passives'].values[i] != 0 and df['passives'].values[i] != '0':
90
+ st.write("\n**Passives**")
91
+ st.write(df['passives'].values[i])
92
 
93
  #########################################
94
  ## Helper function for LB/CB stat analysis
 
148
 
149
  display_cols_0 = ['image', 'name', 'color', 'star', 'class', 'speed',]
150
  display_cols_1 = [] # ['power', 'attack', 'defense', 'health', ] --> to be select base one LB/Costume choice
151
+ display_cols_2 = ['Aether Power', 'source', 'family', 'types', 'skill', 'effects', 'passives']
152
 
153
  prefix = get_prefix(lb_choice, costume_choice)
154
 
 
213
 
214
  special_type_option = st.text_input(label="SpecialSkill Category", value="Hit 3")
215
  special_text_option = st.text_input(label="SpecialSkill Text", value="Dispel")
216
+ passive_text_option = st.text_input(label="Passive Text", value="")
217
  with col2:
218
  st.header("Stat Filters")
219
  st.write("Tips: put the **minimum** att/def/hp stat you want to filter heroes")
 
279
 
280
  if special_text_option != '':
281
  idx_all.append(filter_by_1col(df, 'effects', special_text_option, exact_flag=False))
282
+
283
+ if passive_text_option != '':
284
+ idx_all.append(filter_by_1col(df, 'passives', passive_text_option, exact_flag=False))
285
 
286
  #########################################
287