private static void doInfiltration(final Creature cr, final CreatureType ct) { if (ct.infiltration.base != 0 && ct.infiltration.range != 0) { cr.infiltration(ct.infiltration.aValue()); } else if (cr.alignment() == Alignment.LIBERAL) { cr.infiltration(15 + i.rng.nextInt(10) - 5); } else if (cr.alignment() == Alignment.MODERATE) { cr.infiltration(25 + i.rng.nextInt(10) - 5); } else { cr.infiltration(cr.infiltration() + 35 * (1 - cr.infiltration()) + i.rng.nextInt(10) - 5); } if (cr.infiltration() < 0) { cr.infiltration(0); } if (cr.infiltration() > 100) { cr.infiltration(100); } }
@Override void apply(final Creature cr, final CreatureType ct) { if (i.mode() == GameMode.SITE && i.site.current().highSecurity() != 0) { cr.name("Enforcer"); cr.skill().setSkill(CLUB, i.rng.nextInt(3) + 3); } cr.weapon() .giveCreatureWeapon( ct.weapontypes.get(i.issue(Issue.GUNCONTROL).law().trueOrdinal() + 2)); if (i.site.type().disguisesite()) { cr.alignment(Alignment.CONSERVATIVE); cr.infiltration(i.rng.nextInt(40)); } else { cr.alignment(Alignment.MODERATE); } }