211 lines
9.2 KiB
C#
211 lines
9.2 KiB
C#
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace BrewMonster.Scripts.Skills
|
|
{
|
|
public enum skill_type{
|
|
TYPE_ATTACK = 1, // Attack // 锟斤拷锟斤拷锟斤拷锟斤拷
|
|
TYPE_BLESS = 2, // Blessing // 锟斤拷锟斤拷祝锟斤拷
|
|
TYPE_CURSE = 3, // Curse // 锟斤拷锟斤拷锟斤拷锟斤拷
|
|
TYPE_SUMMON = 4, // Summon // 锟斤拷品锟斤拷锟斤拷
|
|
TYPE_PASSIVE = 5, // Passive // 锟斤拷锟斤拷
|
|
TYPE_ENABLED = 6, // Enabled // 锟斤拷锟斤拷锟斤拷锟斤拷
|
|
TYPE_LIVE = 7, // Live // 锟斤拷锟斤拷
|
|
TYPE_JUMP = 8, // Jump // 瞬锟斤拷
|
|
TYPE_PRODUCE = 9, // Production (Crafting) // 锟斤拷锟斤拷(锟斤拷锟斤拷)
|
|
TYPE_BLESSPET = 10, // Pet Blessing // 锟斤拷锟斤拷祝锟斤拷
|
|
TYPE_NEUTRALBLESS = 11, // Neutral Blessing // 锟斤拷锟斤拷祝锟斤拷
|
|
};
|
|
|
|
public enum range_type{
|
|
TYPE_POINT = 0, // 锟斤拷
|
|
TYPE_LINE = 1, // 锟斤拷
|
|
TYPE_SELFSPHERE = 2, // 锟斤拷锟斤拷为锟斤拷锟侥碉拷锟斤拷
|
|
TYPE_TARGETSPHERE = 3, // 目锟斤拷为锟斤拷锟侥碉拷锟斤拷
|
|
TYPE_TAPER = 4, // 圆锥
|
|
TYPE_SLEF = 5, // 锟斤拷锟斤拷
|
|
};
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
public struct LearnRequirement
|
|
{
|
|
public int level; // 等级要求 // Level requirement
|
|
public int sp; // 技能点 // Skill points
|
|
public int money; // 金钱 // Money
|
|
public int profession; // 职业 // Profession
|
|
public int rank; // 阶级别 // Rank level
|
|
public int realm_level; // 境界等级 // Realm level
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
public struct PetRequirement
|
|
{
|
|
public int level; // 等级级别 // Level requirement
|
|
public int sp; // 宠物技能点 // Pet skill points
|
|
public int list; // 宠物技能列表 // Pet skill list
|
|
public int lsize; // 列表大小 // List size
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
public struct GoblinRequirement
|
|
{
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
|
public int[] genius; // 小精灵技能天赋 // Goblin skill talents
|
|
public int profession; // 职业 // Profession
|
|
public int sp; // 精灵元气 // Spirit points
|
|
public int money; // 精灵金钱 // Money
|
|
public int level; // 小精灵等级 // Goblin level
|
|
public int mp; // 小精灵当前魔法点数 // Current magic points
|
|
}
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
|
public struct ComboSkillState
|
|
{
|
|
public const int MAX_COMBO_ARG = 3;
|
|
public uint skillid;
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = MAX_COMBO_ARG)]
|
|
public int[] arg;
|
|
}
|
|
|
|
public struct UseRequirement
|
|
{
|
|
public int mp; //魔锟斤拷 // Magic points
|
|
public int ap; //怒锟斤拷值 // Anger points
|
|
public int form; //锟斤拷锟斤拷状态 // Form state
|
|
public int weapon; //锟斤拷锟斤拷 // Weapon
|
|
public int freepackage; //锟斤拷锟斤拷锟斤拷剩锟斤拷锟斤拷目 // Remaining inventory slots
|
|
public int arrow; //装锟斤拷锟斤拷支锟斤拷目 // Number of arrows loaded
|
|
public int move_env; //锟狡讹拷锟斤拷锟斤拷 // Movement environment
|
|
public bool is_combat; //锟角凤拷战锟斤拷状态 // Whether in combat state
|
|
public int hp; //锟斤拷前hp // Current HP
|
|
public int max_hp; //锟斤拷锟絟p // Maximum HP
|
|
// public ComboSkillState combo_state; //锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷 // Combo skill state
|
|
};
|
|
|
|
public struct GoblinUseRequirement
|
|
{
|
|
public int mp; //锟斤拷锟斤拷(元锟斤拷)
|
|
public int ap; //锟斤拷锟斤拷(锟斤拷锟斤拷)
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
|
public int[] genius; //小锟斤拷锟介技锟斤拷锟届赋锟斤拷
|
|
public int profession; //锟斤拷锟斤拷职业
|
|
public int level; //小锟斤拷锟斤拷燃锟斤拷锟斤拷锟斤拷诩锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟?
|
|
public int move_env; //锟斤拷锟剿碉拷前锟狡讹拷锟斤拷锟斤拷
|
|
};
|
|
|
|
public class SkillStr
|
|
{
|
|
public virtual ushort[] Find(int id) {return new ushort[0];}
|
|
}
|
|
|
|
public enum SKILL_STATE
|
|
{
|
|
SKILL_PERFORM,
|
|
SKILL_DONE,
|
|
}
|
|
public class ElementSkill
|
|
{
|
|
public const byte FORM_MASK_HIGH = 0xC0;
|
|
public const byte FORM_NORMAL = 0; //锟斤拷通锟斤拷态
|
|
public const byte FORM_CLASS = 1; //职业锟斤拷锟斤拷
|
|
public const byte FORM_BEASTIE = 2; //锟斤拷小锟斤拷锟斤拷
|
|
public static uint NextSkill(uint id = 0)
|
|
{
|
|
//TODO: Implement this
|
|
return 0;
|
|
}
|
|
|
|
// 锟斤拷锟斤拷锟斤拷锟斤拷
|
|
public virtual ushort[] GetName() { return null;}
|
|
public virtual byte[] GetNativeName() { return null;}
|
|
// 锟斤拷锟斤拷锟斤拷锟?,锟斤拷skill_type
|
|
public virtual byte GetType() { return 1; }
|
|
// 锟斤拷锟斤拷图锟斤拷
|
|
public virtual byte[] GetIcon() { return null; }
|
|
// 锟斤拷锟斤拷说锟斤拷
|
|
public virtual ushort[] GetIntroduction(string buf,int len,SkillStr table) { return new ushort[0]; }
|
|
// 锟斤拷锟斤拷职业锟斤拷锟斤拷
|
|
public virtual int GetCls() { return -1; }
|
|
// 锟斤拷锟斤拷锟斤拷却时锟戒,锟斤拷位锟斤拷锟斤拷
|
|
public virtual int GetCoolingTime() { return 5000; }
|
|
// 锟斤拷锟斤拷执锟斤拷时锟戒,锟斤拷位锟斤拷锟斤拷
|
|
public virtual int GetExecuteTime() { return 1000; }
|
|
// 目锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷, 0:锟斤拷锟斤拷目锟疥,1:锟斤拷要目锟疥,2:目锟斤拷锟斤拷锟斤拷锟绞?锟斤拷, 3:目锟斤拷锟斤拷锟轿?锟斤拷锟斤拷, 4:目锟斤拷锟斤拷锟轿?锟斤拷锟斤拷
|
|
public virtual int GetTargetType(){return 0;}
|
|
// 锟斤拷锟斤拷锟斤拷效锟酵放撅拷锟斤拷: <-0.001锟斤拷锟斤拷目锟斤拷 -0.001-0.001 默锟较癸拷锟斤拷锟斤拷锟诫,>0.001 锟酵放撅拷锟斤拷
|
|
public virtual float GetPrayRange(float range, float prayplus) { return 0; }
|
|
|
|
|
|
// 锟斤拷锟斤拷锟斤拷锟芥级锟斤拷
|
|
public virtual int GetRank() { return 0; }
|
|
// 学习n锟斤拷锟斤拷锟斤拷要锟斤拷锟斤拷锟揭硷拷锟斤拷
|
|
public virtual int GetRequiredLevel() { return 0;}
|
|
// 学习n锟斤拷锟斤拷锟斤拷锟斤拷要锟侥硷拷锟杰碉拷
|
|
public virtual int GetRequiredSp() { return 0;}
|
|
// 学习n锟斤拷锟斤拷要锟侥硷拷锟斤拷锟斤拷
|
|
public virtual int GetRequiredBook() { return 0;}
|
|
// 学习锟斤拷要锟斤拷钱
|
|
public virtual int GetRequiredMoney() { return 0;}
|
|
// 学习锟斤拷锟襟境斤拷燃锟?
|
|
public virtual int GetRequiredRealmLevel() { return 0; }
|
|
// 前锟结技锟斤拷
|
|
public virtual Dictionary<uint, int> GetRequiredSkill() => new Dictionary<uint, int>();
|
|
// 锟斤拷示顺锟斤拷
|
|
public virtual int GetShowOrder() { return 0; }
|
|
// 锟斤拷锟矫硷拷锟杰硷拷锟斤拷
|
|
public virtual int SetLevel(int level) { return 0; }
|
|
// 锟斤拷锟斤拷锟斤拷蠹侗锟?
|
|
public virtual int GetMaxLevel() { return 0; }
|
|
|
|
// 锟角凤拷锟斤拷锟斤拷锟斤拷锟斤拷
|
|
public virtual bool IsWarmup() { return false; }
|
|
// 使锟矫猴拷锟角凤拷锟皆讹拷锟斤拷锟斤拷
|
|
public virtual bool IsAutoAttack(){return false;}
|
|
// 瞬锟斤拷锟斤拷锟斤拷
|
|
public virtual bool IsInstant(){return false;}
|
|
// 锟角凤拷锟斤拷锟斤拷锟斤拷锟?
|
|
public virtual bool IsDurative() { return false; }
|
|
// 杀锟剿凤拷围锟斤拷锟斤拷锟斤拷
|
|
public virtual int GetRangeType() { return 0; }
|
|
// 锟酵放伙拷锟斤拷锟斤拷锟斤拷锟叫★拷锟斤拷锟芥、水锟斤拷
|
|
public virtual int GetCastEnv() { return 0; }
|
|
// 锟斤拷取小锟斤拷锟斤拷学习锟斤拷锟酵放硷拷锟斤拷锟斤拷锟斤拷锟届赋锟斤拷
|
|
public virtual int GetRequiredGenius(int idSkill) { return 0; }
|
|
|
|
// 效锟斤拷锟侥硷拷锟斤拷
|
|
public virtual byte[] GetEffect() { return null;}
|
|
public virtual byte[] GetElseEffect() { return null;}
|
|
|
|
// 使锟斤拷锟斤拷要MP
|
|
public virtual int GetMpCost(){return 1;}
|
|
|
|
// 使锟斤拷锟斤拷要AP
|
|
public virtual int GetApCost(){return 0;}
|
|
|
|
// 锟斤拷支锟斤拷锟斤拷
|
|
public virtual int GetArrowCost(){return 0;}
|
|
|
|
// 锟斤拷锟斤拷锟斤拷锟斤拷锟叫讹拷
|
|
public virtual bool ValidWeapon(int w) { return true; }
|
|
// 0, 锟缴癸拷锟斤拷1锟斤拷锟斤拷锟斤拷锟斤拷匹锟戒;2, mp锟斤拷锟姐;3锟斤拷位锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟姐;4锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷悖?5锟斤拷锟斤拷锟斤拷ID, 6锟斤拷未选锟斤拷目锟斤拷
|
|
public int Condition(UseRequirement info)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
public virtual bool IsAllowLand(){ return true; }
|
|
public virtual bool IsAllowWater(){ return true; }
|
|
public virtual bool IsAllowAir(){ return true; }
|
|
public virtual bool GetNotuseInCombat(){ return false; }
|
|
//锟角凤拷锟狡讹拷施锟斤拷
|
|
public virtual bool IsMovingSkill() { return false; }
|
|
// 锟斤拷锟斤拷锟杰凤拷锟节碉拷前锟斤拷锟斤拷状态锟斤拷使锟斤拷
|
|
public bool IsValidForm(byte form)
|
|
{
|
|
byte form_type = (byte)((form & FORM_MASK_HIGH) >> 6);
|
|
return ((GetAllowForms() & (1 << form_type))!=0);
|
|
}
|
|
public virtual byte GetAllowForms() { return 0; }
|
|
public virtual bool Interrupt() { return true; }
|
|
}
|
|
} |