// Equipped creature gets +1/+1.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoostEquippedEffect(1, 1)));
// As long as it's legendary, it gets an additional +2/+2.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
new BoostEquippedEffect(2, 2),
new EquippedMatchesFilterCondition(legendaryFilter), rule1)));
// As long as it's red, it has trample.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinousEffect(
new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT),
new EquippedMatchesFilterCondition(redFilter), rule2)));
// Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.)
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1), new TargetControlledCreaturePermanent()));
}