Skip to content

Commit

Permalink
fix flag description, change spell member
Browse files Browse the repository at this point in the history
AdditionalSpells -> ExtraEffects
  • Loading branch information
KorGgenT committed Nov 24, 2019
1 parent 759be57 commit 843e348
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions spell_form.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions spell_form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ private void clipboard_button_Click(object sender, EventArgs e)
main_spell.AffectedBps = effected_body_part_listbox.CheckedItems.Cast<string>().ToList();
main_spell.EffectTargets = effect_filter_listbox.CheckedItems.Cast<string>().ToList();

main_spell.AdditionalSpells = null;
main_spell.ExtraEffects = null;
if(additionalSpellGrid.Rows.Count > 0)
{
main_spell.AdditionalSpells = new List<FakeSpell> { };
main_spell.ExtraEffects = new List<FakeSpell> { };
}
foreach(DataGridViewRow row in additionalSpellGrid.Rows)
{
Expand All @@ -73,7 +73,7 @@ private void clipboard_button_Click(object sender, EventArgs e)
MaxLevel = (int)row.Cells[1].Value,
Self = (bool)row.Cells[2].Value
};
main_spell.AdditionalSpells.Add(spell);
main_spell.ExtraEffects.Add(spell);
}

main_spell.LearnSpells = null;
Expand Down Expand Up @@ -137,5 +137,15 @@ private void spellsLearnedAddButton_Click(object sender, EventArgs e)
int spell_level = (int)SpellsLearnedUpDown.Value;
spellsLearnedGrid.Rows.Add(spell_id, spell_level);
}

private void flags_listbox_SelectedIndexChanged(object sender, EventArgs e)
{
string flag = flags_listbox.SelectedItem.ToString();
if(!spell.allowed_strings.spell_flags_description.ContainsKey(flag))
{
return;
}
flag_description_labe.Text = spell.allowed_strings.spell_flags_description[flag];
}
}
}
2 changes: 1 addition & 1 deletion spell_type.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public spell_type() { }
public string EffectStr { get; set; } = "";

[DefaultValue(default(List<FakeSpell>))]
public List<FakeSpell> AdditionalSpells { get; set; }
public List<FakeSpell> ExtraEffects { get; set; }

[DefaultValue("none")]
public string FieldId { get; set; } = "none";
Expand Down

0 comments on commit 843e348

Please sign in to comment.