Weapon (longsword), legendary (requires attunement)
This item is a sentient chaotic good weapon with Int 11, Wis 17, Cha 16. It has hearing and normal vision out to 60 feet. The weapon communicates by transmitting emotions to its bearer. It appears to be merely a longsword hilt. While grasping the hilt, you can use a bonus action to cause a blade of pure radiance to spring into existence, or to make the blade disappear. While the blade exists, this magic longsword has the finesse property. If you have proficiency with shortswords or longswords, you are proficient with the sunsword.
Radiance. The sword deals radiant damage instead of slashing damage. When you hit an undead with it, you deal an extra 1d8 radiant damage to it. The blade emits bright light out to 15 feet and dim light an additional 15 feet. The light is sunlight. While the blade persists, you can use an action to expand or reduce its radii of light by 5 feet each (minimum 10, maximum 30).