Skip to content

Commit

Permalink
slight adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
php42 committed Mar 11, 2021
1 parent 6261396 commit 4d977d3
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions editor/TrainerWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -782,33 +782,14 @@ private void TrainerEquipBT_Click(object sender, EventArgs e)
var style = data.styles[puppet.style];

var moves = new List<uint>();
void add_move(uint id)
{
var skill = skills_[id];
if((skill.priority <= 0) && (skill.type != "Status"))
{
if(style.base_stats[1] > style.base_stats[3])
{
if(skill.type != "Focus")
return;
}
else if(style.base_stats[1] < style.base_stats[3])
{
if(skill.type != "Spread")
return;
}
}

moves.Add(id);
}

var lvl = LevelFromExp(data.cost, puppet.experience);
foreach(var it in skills_)
{
var id = it.Key;
var lvlreq = data.LevelToLearn(puppet.style, id);
if((lvlreq >= 0) && (lvl >= lvlreq))
add_move(id);
moves.Add(id);
}
var tmp = new List<uint>(moves);
foreach(var i in tmp)
Expand All @@ -821,7 +802,7 @@ void add_move(uint id)
var skill2 = skills_[j];
if(skill2.type == "Status")
continue;
if((skill2.element == skill1.element) && (skill2.priority == skill1.priority) && (skill2.power > skill1.power))
if((skill2.element == skill1.element) && (skill2.type == skill1.type) && (skill2.priority == skill1.priority) && (skill2.power > skill1.power))
{
moves.Remove(i);
break;
Expand Down

0 comments on commit 4d977d3

Please sign in to comment.