It is unavoidable that you need some custom Javascript for this, as I did in the Fantastic XIII Diagram. Although the promotion rules could be easily implemented by defining maxPromote=0 and adding morph parameters behind the pieces that do promote (like morph=Q following the Pawn definition), this will not work for the Troll. Because there the morphing is not purely location-dependent, but also depends on the type of move that it makes. And the Diagram has no standard feature yet to make the morphing move-dependent.
It is unavoidable that you need some custom Javascript for this, as I did in the Fantastic XIII Diagram. Although the promotion rules could be easily implemented by defining maxPromote=0 and adding morph parameters behind the pieces that do promote (like morph=Q following the Pawn definition), this will not work for the Troll. Because there the morphing is not purely location-dependent, but also depends on the type of move that it makes. And the Diagram has no standard feature yet to make the morphing move-dependent.