Style cleanup
This commit is contained in:
@@ -27,8 +27,7 @@ public class Conversion2 : Script
|
||||
if (indexOfNext == -1)
|
||||
return x;
|
||||
return x.Take(indexOfNext);
|
||||
})
|
||||
.SelectMany(x => x)
|
||||
}).SelectMany(x => x)
|
||||
// We only want the last move choice by the target
|
||||
.OfType<IMoveChoice>().FirstOrDefault(x => x.User == target);
|
||||
if (lastMoveByTarget == null)
|
||||
@@ -42,11 +41,9 @@ public class Conversion2 : Script
|
||||
var type = typeLibrary.GetAllEffectivenessFromAttacking(lastMoveByTarget.ChosenMove.MoveData.MoveType)
|
||||
.Where(x => x.effectiveness < 1)
|
||||
// Shuffle them randomly, but deterministically
|
||||
.OrderBy(_ => move.User.BattleData.Battle.Random.GetInt())
|
||||
.ThenBy(x => x.type.Value)
|
||||
.OrderBy(_ => move.User.BattleData.Battle.Random.GetInt()).ThenBy(x => x.type.Value)
|
||||
// And grab the first one
|
||||
.Select(x => x.type)
|
||||
.FirstOrDefault();
|
||||
.Select(x => x.type).FirstOrDefault();
|
||||
if (type == null)
|
||||
{
|
||||
move.GetHitData(target, hit).Fail();
|
||||
|
||||
Reference in New Issue
Block a user