#W# Initial Commit: Avatars Conquest

This commit is contained in:
WarrentyExpired 2026-07-04 10:35:30 -04:00
commit 5df497787a
7510 changed files with 416048 additions and 0 deletions

57
Scripts/Misc/Ultima.cs Normal file
View file

@ -0,0 +1,57 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Misc;
using Server.Mobiles;
using Server.Network;
using Server.Spells;
namespace Server
{
public class CurrentExpansion
{
private static readonly Expansion Expansion = Expansion.AOS;
public static void Configure()
{
Core.Expansion = Expansion;
bool Enabled = Core.AOS;
ObjectPropertyList.Enabled = Enabled;
Mobile.VisibleDamageType = Enabled ? VisibleDamageType.Related : VisibleDamageType.None;
Mobile.GuildClickMessage = !Enabled;
Mobile.AsciiClickMessage = !Enabled;
if ( Enabled )
{
if ( ObjectPropertyList.Enabled )
PacketHandlers.SingleClickProps = true; // single click for everything is overriden to check object property list
}
}
}
public class Ultima
{
public static int Damage( Mobile m, int damage )
{
return Damage( m, null, damage );
}
public static int Damage( Mobile m, Mobile from, int damage )
{
if( m == null || m.Deleted || !m.Alive || damage <= 0 )
return 0;
m.Damage( damage, from );
return damage;
}
public static int Scale( int input, int percent )
{
return (input * percent) / 100;
}
}
}